This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.
For more information, see this announcement post . Click the X in the top right-corner of this box to dismiss this message.
Old posts that have not been replied to for several years.
Dedan
Master
Posts: 260 Joined: Wed Jul 09, 2003 10:50 pm
Location: Memphis
Post
by Dedan » Thu Sep 11, 2003 7:17 am
I need to kill timers when a ".rehash' command is called.
I have read the manuals and searched some scripts.
but i am not clearly understanding the format.
The process to get the timer "id" is vague to me
my timers are:
utimer $av_time [list av:voice $nick $chan]
utimer $bnj_limit {incr bnj_ctr -1}
utimer 9 {set bnj_mode 1}
Thanks for any help given.
I once was an intelligent young man, now i am old and i can not remember who i was.
user
Posts: 1452 Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway
Post
by user » Thu Sep 11, 2003 7:47 am
Dedan wrote: The process to get the timer "id" is vague to me
You have two options:
1) store the timer id returned by 'timer'/'utimer' when the timer is created.
2) search through the list returned by 'timers'/'utimers'
Last edited by
user on Thu Sep 11, 2003 1:19 pm, edited 1 time in total.
Have you ever read "The Manual"?
Dedan
Master
Posts: 260 Joined: Wed Jul 09, 2003 10:50 pm
Location: Memphis
Post
by Dedan » Thu Sep 11, 2003 8:11 am
could you expand on that please.
I once was an intelligent young man, now i am old and i can not remember who i was.
user
Posts: 1452 Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway
Post
by user » Thu Sep 11, 2003 10:32 am
Dedan wrote: could you expand on that please.
When creating the utimer:
Code: Select all
set stored_timer_ID [utimer 10 [list do stuff]]
Using 'utimers':
Code: Select all
foreach u [utimers] {
# here [lindex $u 1] is the command to be performed
# and [lindex $u 2] is the timer ID
}
But maybe you're not asking the right question? How about not starting any new timers if you're rehashing? Just set a global variable in your script and check if it exists before creating the timers.
Have you ever read "The Manual"?
Dedan
Master
Posts: 260 Joined: Wed Jul 09, 2003 10:50 pm
Location: Memphis
Post
by Dedan » Thu Feb 12, 2004 8:37 pm
user wrote:
foreach u [utimers] {
# here [lindex $u 1] is the command to be performed
# and [lindex $u 2] is the timer ID
}
in the following code , wouldn't [lindex $u 2] be $nick?
Code: Select all
utimer $av_time [list av:voice $nick $chan]
so where is the 'timer id" in this list?
I once was an intelligent young man, now i am old and i can not remember who i was.