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.

need to add a flood protection in public channel commands

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
n
noobman
Voice
Posts: 29
Joined: Fri Nov 23, 2007 8:47 am

need to add a flood protection in public channel commands

Post by noobman »

hi, i'd like to know whats the code i must add so that the clones and proxys dont flood my bot.

For example to add the flood protect to this command:

Code: Select all

bind pub - ?errorsteam errorsteam

proc errorsteam { nick host hand chan arg } {
putserv "PRIVMSG $chan : $nick : To fix this problem, you must reboot the steam and try to join again the game, this problem is when you get ticketID error. more info pm @.
}
i want that they cant flood by joining 6 or 7 clones and typing ?errorsteam.

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

Post by Sir_Fz »

Search the forum using keyword throttled.
n
noobman
Voice
Posts: 29
Joined: Fri Nov 23, 2007 8:47 am

stild dont find what i need

Post by noobman »

I must be a noob becuse i look for it as you told me. And i don't find it. Could you link me to the antiflood script for public commands so that i can add it to my help script ? Thanks a lot.
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Code: Select all

bind pub - ?errorsteam errorsteam

proc errorsteam { nick host hand chan arg } {
 if {![throttled $host,$chan 30]} {
  putserv "PRIVMSG $chan : $nick : To fix this problem, you must reboot the steam and try to join again the game, this problem is when you get ticketID error. more info pm @."
 }
}


# user's throttled proc
proc throttled {id time} {
 global throttled
 if {[info exists throttled($id)]} {
  return 1
 } {
  set throttled($id) [clock sec]
  utimer $time [list unset throttled($id)]
  return 0
 }
}
This allows using the ?errorsteam command only once every 30 seconds.
n
noobman
Voice
Posts: 29
Joined: Fri Nov 23, 2007 8:47 am

real thanks

Post by noobman »

thanks a lot mate. good work, sorry for disturbing :). i will test it.
Post Reply