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.

utimer not functioning correctly?

Old posts that have not been replied to for several years.
Locked
t
tango

utimer not functioning correctly?

Post by tango »

see my reply below ...... :)
Last edited by tango on Tue Mar 23, 2004 1:54 am, edited 1 time in total.
t
tango

Post by tango »

thanks to the guys at #tcl on efnet who helped me out with this..
However, am I stuck at a somewhat iffy point..

The timer will continue to go, however I am still trying to figure out how to use killutimer to kill this timer?
I need the timer to stop once someone types @found

I tried the following, however it didn't seem to work.

Code: Select all

bind pub - @found found

### found command ###
proc found {nick host hand chan arg} {
foreach utimer [utimers] { 
if {[string match $mytimer [lindex $utimer 2]]} { 
killutimer $mytimer 
}

mytimer is the timerid I used for the orgional utimer, as follows:
set mytimer [utimer 40 [list foo $c $5on5msg]]

so... not sure how to do this one now :(
Any help or suggestions?
User avatar
Xpert
Halfop
Posts: 88
Joined: Mon Mar 08, 2004 7:03 am

Post by Xpert »

You didn't set the variable "$mytimer".
Try this code:

Code: Select all

set mytimer "foo"

bind pub - @found found
proc found {nick host hand chan arg} {
global mytimer
  foreach utimer [utimers] {
    if {[string match "$mytimer" "[lindex $utimer 2]"]} {
      killutimer $mytimer
    }
  }
}
It should worked.... but i didn't test it :)
Xpert.
Locked