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?
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.
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.