| View previous topic :: View next topic |
| Author |
Message |
vigilant Halfop
Joined: 05 Jan 2006 Posts: 48
|
Posted: Fri Dec 14, 2007 4:59 pm Post subject: Timers not dying[solved] |
|
|
First i want to ask, how can kill a timer using .tcl in DCC?
Is there a way hehe?
And now, my script i'm using this code, but it's not killing the timers, it keeps starting... hehe
I am basically trying to do, if it finds itself op i want to kill the timers for the message
thanks
| Code: | proc complain {} {
global services botnick
utimer $services(complaintime) complain
set chan $::channel
puthelp "PRIVMSG $chan :No access to op myself, please op me."
set testtimer ""
foreach testtimer [utimers] {
if {[string match "complain" $testtimer]} {
utimer $services(complaintime) complain
if {[botisop $chan]} {
set killit ""
foreach killit [utimers] {
if {[string equal -nocase complain [lindex $killit 1]]} {
killutimer [lindex $killit 2]
break
}
}
}
}
} } |
_________________ Anser Quraishi
Website: http://www.anserq.com
Last edited by vigilant on Fri Dec 14, 2007 9:17 pm; edited 1 time in total |
|
| Back to top |
|
 |
TCL_no_TK Owner

Joined: 25 Aug 2006 Posts: 509 Location: England, Yorkshire
|
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Fri Dec 14, 2007 6:00 pm Post subject: |
|
|
As to your op-check, eggdrop has a mechanism to detect when it is opless, allowing you to execute custom code when that happens. Once an opless state has been detected, the code will be executed continuosly (with a slight delay inbetween invocations) until your eggdrop regains op.
Current, recommended, approach is something like this:
| Code: | bind need - "% op" wewantops
proc wewantops {chan what} {
puthelp "PRIVMSG $chan :No access to op myself, please op me."
} |
An older, now deprecated approach is something like this:
| Code: | | channel set #yourchannel need-op { puthelp "PRIVMSG #yourchannel :No access to op myself, please op me." |
Worth noting, in the second approach, the code is limited to 120 characters, whereas the first has no such limit. _________________ NML_375, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
vigilant Halfop
Joined: 05 Jan 2006 Posts: 48
|
Posted: Fri Dec 14, 2007 9:16 pm Post subject: |
|
|
| nml375 wrote: | As to your op-check, eggdrop has a mechanism to detect when it is opless, allowing you to execute custom code when that happens. Once an opless state has been detected, the code will be executed continuosly (with a slight delay inbetween invocations) until your eggdrop regains op.
Current, recommended, approach is something like this:
| Code: | bind need - "% op" wewantops
proc wewantops {chan what} {
puthelp "PRIVMSG $chan :No access to op myself, please op me."
} |
An older, now deprecated approach is something like this:
| Code: | | channel set #yourchannel need-op { puthelp "PRIVMSG #yourchannel :No access to op myself, please op me." |
Worth noting, in the second approach, the code is limited to 120 characters, whereas the first has no such limit. |
Thank you sir. This does work clearly. I got told, i was trying to reinvent the wheel haha.. so yeah.
Got it working  _________________ Anser Quraishi
Website: http://www.anserq.com |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|