return $str
}
+proc check_telling {nl event} {
+ # for all except `talk' we delay 750ms
+ switch -exact $event {
+ none {
+ }
+ talk {
+ check_telling_core $nl talk
+ check_telling_core $nl act
+ }
+ act {
+ after 750 [list check_telling_core $nl $event]
+ }
+ default {
+ error "check_telling $nl $event"
+ }
+ }
+}
+
proc check_telling_core {nl event} {
- # event is `talk', `act' or `come'
-FIXME - delay 750ms when you invoke this, except for `talk'
- which causes `talk' now and `act' later
+ # event is `talk' or `act'
+ # When user talks we actually get talk now and act later
FIXME - make it be called with come
-FIXME -
+FIXME - implement all cmds
+FIXME - implement tells_deliver set stt [list $u passed $now]
+FIXME - implement tells_delete catch { unset stt } ?
set iml [msgdb_get $nl inbound]
if {![llength $iml]} return
t??prv?v {
# consider delivered:
# (very recently passed, and the user talks)
- tell_delete {} $nl
+ tells_delete {} $nl
}
t??????? {
# ignore
# and should not pass)
sendprivmsg $nl \
{You have messages (so identify yourself please).}]
+ set stt [list $u mentioned $now]
}
* {
error "check_telling_core nl=$nl evstate=$evstate ?"
}
}
-
-
- }
-
-
- {
- }
- ns???u
-
-
-
- if {[
- set security
-
- switch -exact
-
- if {![info exists u]} { catch { unset telling } }
- && [info exists telling]} {
-
-
- }
-
- if {![info exists telling]} {
-
-
proc recordlastseen_n {n how here} {
global lastseen lookedfor
set nl [irctolower $n]
if {!$here} return
- check_telling $nl [lindex {x act talk} $here]
+ check_telling $nl [lindex {none act talk} $here]
upvar #0 lookedfor($nl) lf
if {[info exists lf]} {