This task might slow the bot, I can manually at utimers and check for each channel with a delay, but how to make this system automated? Any idea? to help for the delay queing. Suppose I want to delay 2mins between the /whois check for every channel. Can't seem to get anything in my head currently, maybe because its just 8:30am here, heh.
Code: Select all
bind time - "*" check:ascii:time
proc check:ascii:time {m h d mo y} {
#check the time interval to perform the scan
if {([scan $m %d]+([scan $h %d]*60)) % 10 == 0} {
#whois channel users
foreach chan [split [string tolower [channels]]] {
foreach user [chanlist $chan] {
if {![isbotnick $user] && ![isop $user $chan] && ![isvoice $user chan]} {
puthelp "WHOIS $user"
}
}
}
}
}
Code: Select all
set userlist [list]
foreach chan [split [string tolower [channels]]] {
foreach user [chanlist $chan] {
if {![isbotnick $user] && ![isop $user $chan] && ![isvoice $user chan]} {
lappend userlist($chan) $user
}
}
}