| View previous topic :: View next topic |
| Author |
Message |
noobman Voice
Joined: 23 Nov 2007 Posts: 29
|
Posted: Thu Feb 14, 2008 8:46 am Post subject: need to add a flood protection in public channel commands |
|
|
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: | 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 |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
|
| Back to top |
|
 |
noobman Voice
Joined: 23 Nov 2007 Posts: 29
|
Posted: Sat Feb 16, 2008 6:35 am Post subject: stild dont find what i need |
|
|
| 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. |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Sat Feb 16, 2008 6:58 am Post subject: |
|
|
| Code: | 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. _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
noobman Voice
Joined: 23 Nov 2007 Posts: 29
|
Posted: Sat Feb 16, 2008 7:13 am Post subject: real thanks |
|
|
thanks a lot mate. good work, sorry for disturbing . i will test it. |
|
| Back to top |
|
 |
|