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.

timer problem

Old posts that have not been replied to for several years.
Locked
m
misterys
Voice
Posts: 23
Joined: Sun Mar 30, 2003 2:43 pm

timer problem

Post by misterys »

hi,

my problem is the following:

i want to make tcl for my eggdrop which puts mode +i if there are more than 10 joins in 1 minute
how can i do this? i dont know how to use/set the timer :(

please help
misterys
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

This should do it:

Code: Select all

bind join - * lock:i

proc lock:i {nick uhost hand chan} {
 global countj
 if {![info exists countj([set chan [string tolower $chan]])]} { set countj($chan) 0 }
 incr countj($chan)
 timer 1 [list incr countj($chan) -1]
 if {$countj($chan) == 10} {
  putquick "MODE $chan +i" -next
 }
}
Locked