egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[solved] simple flood protection?

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
bierbong
Voice


Joined: 21 May 2009
Posts: 7

PostPosted: Thu May 21, 2009 12:44 pm    Post subject: [solved] simple flood protection? Reply with quote

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
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Thu May 21, 2009 1:21 pm    Post subject: Reply with quote

Search for throttled on the forum, and you'll find several solutions to this.
_________________
NML_375, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
arfer
Master


Joined: 26 Nov 2004
Posts: 436
Location: Manchester, UK

PostPosted: Thu May 21, 2009 1:21 pm    Post subject: Reply with quote

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
View user's profile Send private message
bierbong
Voice


Joined: 21 May 2009
Posts: 7

PostPosted: Thu May 21, 2009 3:13 pm    Post subject: Reply with quote

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

Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber