Code: Select all
bind pub -|- !ison ison:nick
proc ison:nick {nick host hand chan arg} {
global ison botnick ison_infonick
set ison(rchan) "$chan"
set isoninfonick [lindex [split $arg] 0]
if {$isoninfonick == ""} {
putquick "NOTICE $nick :Syntax: !ison <Nick>"
return 0
}
bind raw -|- 303 isonnick:isonline
set ison_infonick "$isoninfonick"
putquick "PRIVMSG $ison(rchan) :Please wait..."
putquick "ISON $ison_infonick"
return 0
}
proc isonnick:isonline {from keyword arg} {
global ison ison_infonick botnick
if {([string match "*$ison_infonick*" $arg])} {
putserv "PRIVMSG $ison(rchan) :$ison_infonick is online!"
unbind raw -|- 303 isonnick:isonline
return 0
} else {
putserv "PRIVMSG $ison(rchan) :$ison_infonick is offline!"
unbind raw -|- 303 isonnick:isonline
return 0
}
}