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.

a little help

Help for those learning Tcl or writing their own scripts.
Post Reply
k
kitsaras
Voice
Posts: 29
Joined: Thu Feb 02, 2006 4:57 pm

a little help

Post by kitsaras »

Code: Select all

bind pub - !servers statsu
bind raw - 242 show:statsu

set statsuc 0

proc statsu {nick uhost hand chan arg} {
 global statsu statsuc
 if {$statsuc > 0} {
  puthelp "privmsg $chan :Already in progress"
  return 0
 }
 set servers {xtreme.ca.hellasirc.net speed.ca.hellasirc.net auth.eu.hellasirc.net hell.eu.hellasirc.net}
 foreach server $servers {
  incr statsuc
  if {![info exists statsu([set chan [string tolower $chan]]:$statsuc)]} {
   set statsu($chan:$statsuc) 0
   putserv "stats u $server"
  }
 }
}

proc show:statsu {from kw arg} {
 global statsu statsuc
 foreach {c v} [array get statsu] {
  puthelp "privmsg [lindex [split $c :] 0] :$from [join [lrange [split $arg] 1 end]]"
  array unset statsu $c
  incr statsuc -1
  break
 }
}
is it possible to put an intevral timer into ?
i.e set intevral_timer 60
Post Reply