egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

help with utimer and killutimer

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
tekster
Voice


Joined: 09 Jul 2006
Posts: 8

PostPosted: Sun Jul 09, 2006 2:46 am    Post subject: help with utimer and killutimer Reply with quote

i need some help with killing the utimer that i start in the start:timer proc, im still pretty new at coding this, so i need some help in getting it to stop, thx

Code:

bind pub - .timer start:timer
bind pub - .stop stop:timer

proc start:timer {nick host hand chan text} {
global channel msg interval id
 if {[string equal -nocase #chan $chan]} {
  if {[isop $nick $chan]} {
   set name $nick
   set interval [lindex $text 0]
   set channel [lindex $text 1]
   set msg [lrange $text 2 end]
   utimer $interval timer
   putserv "NOTICE $nick :Starting timer Message: \"$msg \" Every $interval seconds"
  }
 }
}

proc timer {} {
global channel msg interval timerID
  putserv "PRIVMSG $channel :$msg "
  utimer $interval timer
}

proc stop:timer {nick host hand chan text} {
putserv "NOTICE $nick :Timer stopped"
  foreach t [utimers] {
  if [string match *stop:timer* [lindex $t 1]] {
  killutimer [lindex $t end]
  }
 }
return 1
}
 
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sun Jul 09, 2006 5:18 am    Post subject: Reply with quote

Searching and killing timers.
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
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


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber