eiSi Halfop
Joined: 07 Mar 2002 Posts: 70
|
Posted: Sun Mar 09, 2003 8:01 am Post subject: opcheck proc is wrong |
|
|
hi there!
I am coding an opcheck function, which basically worked fine for me:
| Code: | ### opcheck proc
proc call_opcheck {nick hand chan misc1 misc2} {
global priv botnick home lbn hub
set line ""
set intiv ""
msg $home "\002Op Check\002 Command Issued, if nothing returned, all ok! "
foreach channel [channels] {
set lchannel [string tolower $channel]
if { [botisop $channel ] == 0 } {
msg $home "$channel"
msg $channel "\002Warning:\002 I am not opped, please op me, otherwise I'll part."
set misc2 "timer 3 call_opcheck2"
call_opcheck2 $nick $handle $chan $misc1 $misc2
}
}
}
### opcheck2 proc
proc call_opcheck2 {nick hand chan misc1 misc2} {
killtimer $misc2
if { [botisop $chan ] == 0 } {
msg $chan "You still haven't opped me, I'll part now..."
msg $home "Parting $chan (Opcheck failed)"
channel remove $chan
}
}
|
what isn't working, is the thing with the timer.
I want the bot to start a timer (3 minutes for example) then check again if it is opped. If not, it should part.
what is wrong with my proc? Oh and I am not that good at tcl coding,... yet
thanks for any help! |
|