Bot for flood control and lag reddit / irc ---------------------------------------------------------------------- harkatmuld · 2014-11-15 21:25 Anyone have any ideas on controlling for lag with a flood control script? That is, script is designed to quiet anyone who sends more than X lines in Y seconds. Right now I have the bot periodically pinging Nickserv and recording the response time and disabling flood control if the lag is too large, but for various reasons that's proving ineffective... was wondering if anyone had any ideas. This issue is arising because my server is running unusually slow today... It would be great if I could get the timestamp that a message was actually sent from the server, or even the time that it was received by the code (rather than actually retrieved by the code). The bot is hand-coded in python. Anyone have any ideas? Would be greatly appreciated. Edit: Actually I think it might have been a problem with lag on Nickserv's end (the problem with pining NickServ was that it kept having random jumps up to 12 seconds of lag, then back down to .1)... decided to have the bot PRIVMSG itself instead, will report back ---------------------------------------------------------------------- boo_ood · 2014-11-16 03:12 Why are you pinging nickserv ? The normal way to check this is the standard IRC ping command, (The server will respond with a pong) As for timestamps on the server, IRCv3 has the server time extension, however it is not widely implemented yet ---------------------------------------------------------------------- harkatmuld · 2014-11-16 04:13 through a bouncer, so didn't think I could ping the server - kept getting pings back from the bouncer... but actually, after you said this, looked it up and realized there's a send_raw command so it can get through. thanks for the help! ---------------------------------------------------------------------- joshuacasey · 2014-11-16 17:23 Depending on the IRCd and Services being used you don't need a bot for flood control. If UnrealIRCd (IRCd) is being used just use channel mode +f (you'll need to read the documentation: /helpop ?chmodef ) If Anope (Services) is being used go play with the botserv settings (/bs help kick). If Atheme (Services) is being used, see if the network you're on has the /cs set ANTIFLOOD module loaded. You rarely need a bot for channel management (anti-flood/anti- spam/etc) anymore because modern ircds/services are pretty good about having that functionality built-in. ---------------------------------------------------------------------- harkatmuld · 2014-11-16 22:01 yea, thank you, that would be nice. unfortunately I don't think freenode has this functionality