| View previous topic :: View next topic |
| Author |
Message |
bierbong Voice
Joined: 21 May 2009 Posts: 7
|
Posted: Thu May 21, 2009 12:44 pm Post subject: [solved] simple flood protection? |
|
|
hello,
i want that a certain trigger can only be started for example every 15 second.
can you help me realizing that?
thx!
Last edited by bierbong on Thu May 21, 2009 3:12 pm; edited 1 time in total |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Thu May 21, 2009 1:21 pm Post subject: |
|
|
Search for throttled on the forum, and you'll find several solutions to this. _________________ NML_375, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
arfer Master

Joined: 26 Nov 2004 Posts: 436 Location: Manchester, UK
|
Posted: Thu May 21, 2009 1:21 pm Post subject: |
|
|
| Code: |
bind PUB - !mycommand pCommand
proc pCommand {nick uhost hand chan text} {
global vRelease
if {[info exists vRelease]} {
if {[unixtime] <= $vRelease} {
return 0
}
}
set vRelease [expr {[unixtime] + 15}]
# rest of your code here for whatever the command !mycommand does
return 0
}
|
_________________ I must have had nothing to do |
|
| Back to top |
|
 |
bierbong Voice
Joined: 21 May 2009 Posts: 7
|
Posted: Thu May 21, 2009 3:13 pm Post subject: |
|
|
jeah, thx, you made my day!
it works!!
 |
|
| Back to top |
|
 |
|