# and new msg events are handled by the command procedures, not here.
global calling_nick
if {[info exists calling_nick]} { set save $calling_nick }
+puts "[list tell_event $nl $event]"
switch -exact $event {
none { }
talk {
}
}
if {[info exists save]} { set calling_nick $save }
+global errorInfo
+puts "[list tell_event $nl $event] $errorInfo"
}
proc tell_getcstate {} {
}
proc tell_event_core {nl event} {
+ catch_logged { tell_event_core1 $nl $event }
+}
+
+proc tell_event_core1 {nl event} {
# event is `talk', `act', `ident' or `msgsarrive'
# When user talks we actually get talk now and act later
global calling_nick
set iml [msgsdb_get $nl inbound]
if {![llength $iml]} return
+ set now [clock seconds]
+ tell_getcstate
set ago [expr {$now - $telling_when}]
# Now we have the components of a telling state
append evstate [string range $stt 0 0]
append evstate [string range $event 0 0]
- manyset [tell_effective_sec $n] sec secwhen
+ manyset [tell_effective_sec $nl] sec secwhen
switch -exact $sec {
insecure { append evstate ii }
secure { append evstate [expr {$ago<$secwhen ? "sl" : "ss"}] }
append evstate u
}
- manyset [nickdb_set $n tellrel] rel relint relwithin
+ manyset [nickdb_get $nl tellrel] rel relint relwithin
switch -exact $rel {
unreliable { append evstate uu }
remind { append evstate [expr {
}
pm????? {
# oops, messages passed are now out of date
- catch { unset telling }
+ catch_restoreei { unset telling }
return
}
?m????? {
set stt passed
}
nas?u?? {
- sendprivmsg $nl {You have messages (so identify yourself please).}]
+ sendprivmsg $nl {You have messages (so identify yourself please).}
set stt mentioned
}
masl??? {
- sendprivmsg $nl {Don't forget about your messages.}]
+ sendprivmsg $nl {Don't forget about your messages.}
}
pi????? {
return
}
}
if {![info exists u]} {
- catch { unset telling }
+ catch_restoreei { unset telling }
} else {
set telling [list $u $stt $now]
}
manyset $v rel every within
switch -exact $rel {
unreliable {
- return "As soon as I've told you, I'll forget the message - note that this means messages can get lost !"
+ return "As soon as I've told you message(s), I'll forget them\
+ - note that this means messages can get lost !"
}
pester {
set u {}
error "bad tellrel $rel"
}
}
- return "I'll remind you every [showintervalsecs $every 1] until you say delmsg$u."
+ return "After delivering messages, I'll remind you every\
+ [showintervalsecs $every 1] until you say delmsg$u."
}
def_setting timeformat {
}
def_ucmd identpass {
- set username [ta_word]
- set passmd5 [md5sum "[ta_word]\n"]
- ta_nomore
prefix_nick
check_notonchan
set luser [irctolower $n]
+ set username [ta_word]
+ set passmd5 [md5sum "[ta_word]\n"]
+ ta_nomore
upvar #0 nick_onchans($luser) onchans
if {![info exists onchans] || ![llength $onchans]} {
ucmdr "You must be on a channel with me to identify yourself." {}