my question is:
when i use utimer commnad in procedure for example
utimer 20 [putlog "test"]
only execution of putlog is delayed with 20 seconds or procedure stops for that time and continues after that?
is utimer works for commands like 'foreach' and 'if'?
i'm asking this because i write a procedure for calling ChanServ after netsplit. I want to delay 'foreach' with couple of seconds because somethimes ChanServ returns sometimes not. Here is code:
Code: Select all
bind raw - NOTICE pub:sident
proc pub:sident {from keyword arg} {
global nsnick csnick passwd nsserv csserv
set wrd [lindex $arg 1]
if {((($from==$nsserv)&&($wrd==":This"))||(($from==$csserv)&&($wrd==":Password")))} {
putserv "PRIVMSG $nsnick :IDENTIFY $passwd"
putlog "$nsnick IDENTIFY..."
foreach ch [channels] {
if {([botisop $ch])&&((![onchan $csnick $ch])||([onchansplit $csnick $ch]))} {
putserv "PRIVMSG $csnick :SET $ch GUARD ON"
putlog "$csnick $ch GUARD ON..."
}
}
}
}