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 

Flood Protection addition.

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


Joined: 08 Mar 2006
Posts: 21

PostPosted: Thu Dec 21, 2006 10:14 pm    Post subject: Flood Protection addition. Reply with quote

Hey guys, I have this program here:

Code:
 bind pub - !rules my:example

proc my:example {nick uhost hand chan text} {
  set url "http://testurl.com"
  set token [::http::geturl $url]
  set content [::http::data $token]
  ::http::cleanup $content
  foreach line [split $content \n] {
    putserv "PRIVMSG $nick :$line"
  }
}


I was just looking to have this, so a user cannot say "!rules" 32x and flood my bot. How can I add a configureable flood protection option to this program?

Thank you!
Back to top
View user's profile Send private message Send e-mail AIM Address
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Fri Dec 22, 2006 2:23 am    Post subject: Reply with quote

I would just change the putserv with puthelp, that will automatically send the text at a slower rate (like 1 line per half-second) and it won't flood off.
Back to top
View user's profile Send private message
DJmart
Voice


Joined: 08 Mar 2006
Posts: 21

PostPosted: Fri Dec 22, 2006 8:11 am    Post subject: Reply with quote

That won,t stop anyone from doing "!rules !rules !rules" etc... it will just send the messages out much slower, but still sending mass messages out.

right?


-DJ
Back to top
View user's profile Send private message Send e-mail AIM Address
user
 


Joined: 18 Mar 2003
Posts: 1452
Location: Norway

PostPosted: Fri Dec 22, 2006 10:01 am    Post subject: Reply with quote

http://forum.egghelp.org/viewtopic.php?t=9009#45537
_________________
Have you ever read "The Manual"?
Back to top
View user's profile Send private message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Fri Dec 22, 2006 12:37 pm    Post subject: Reply with quote

If people wanna see the rules 32x in their own privmsg, I don't see the problem. They're just annoying themselves. In any case, if they are spamming xx lines per minute, eggdrop already has the ability to kick flooders off, so use those features.
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Fri Dec 22, 2006 1:13 pm    Post subject: Reply with quote

user wrote:
http://forum.egghelp.org/viewtopic.php?t=9009#45537

Man, your code is beautiful Very Happy
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
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