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.

[solved] simple flood protection?

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
b
bierbong
Voice
Posts: 7
Joined: Thu May 21, 2009 12:40 pm

[solved] simple flood protection?

Post by bierbong »

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.
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Search for throttled on the forum, and you'll find several solutions to this.
NML_375
User avatar
arfer
Master
Posts: 436
Joined: Fri Nov 26, 2004 8:45 pm
Location: Manchester, UK

Post by arfer »

Code: Select all

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
b
bierbong
Voice
Posts: 7
Joined: Thu May 21, 2009 12:40 pm

Post by bierbong »

jeah, thx, you made my day!
it works!!

:)
Post Reply