Freenode Flood Limits reddit / irc ---------------------------------------------------------------------- wmcscrooge · 2013-11-24 21:28 Some other guys and I have been working on an [IRC bot](https://github.com/Progether/IRC-Bot) for /r/progether and we've come across a problem where the bot will be kicked for too many messages to the channel (excess flood). Right now there is a queue that separates all messages with a time gap so that it isn't spamming the channel all at once, but we're not sure about the exact length of the time delay. Does anyone know exactly (or approximately) what the actual flood limits are? Or is there a way to disable them per user/bot or per channel? The channel is #reddit-progether on freenode. It's not connecting with ssl (though that will change now that I realized it isn't) Thanks! ---------------------------------------------------------------------- [deleted] · 2013-11-24 21:29 I would ask the freenode staff about this in #freenode ---------------------------------------------------------------------- [deleted] · 2013-11-24 22:07 Channel owners can set their own flood limits, too, so that needs to be a consideration as well. ---------------------------------------------------------------------- funknut · 2013-11-24 23:16 It has been a long time, but for some reason, one message per 200 milliseconds seems familiar. Ask a staff member in #freenode. Is it being booted from the channel, or is the server killing the connection? ---------------------------------------------------------------------- benburhans · 2013-11-25 00:09 I can answer this with some confidence unless it has changed (unlikely). The rule of thumb is 2 seconds per line, and *that includes lines without content*, like PINGs. The algorithm allows for bursts up to 5 at once (in a 10 second span). There is a separate limit on the number of bytes in the send queue, but it's unlikely you'd hit that without sending several extremely long lines at once. I don't know what freenode's configuration has this set to. If you hit this, your quit message would be "SendQ Exceeded" instead of "Excess Flood". Hope this helps, and you can always hit me up on freenode as *bburhans* if you have more questions. ---------------------------------------------------------------------- benburhans · 2013-11-25 00:10 Last I knew, freenode does not have this feature. You might be thinking of the +j channel mode, which allows you to throttle joins (but not other types of messages, per channel or otherwise). Some channels do implement moderation bots that will quiet people who spam or flood the channel, though. Edit: Oh, I almost forgot my link: http://freenode.net/using_the_network.shtml ---------------------------------------------------------------------- wmcscrooge · 2013-11-25 01:04 Really? That's seems like a very large delay. I've experimented and the bot has been able to send ~20-25 messages at .8 sec delays without even a "throttled due to flooding" message. ---------------------------------------------------------------------- wmcscrooge · 2013-11-25 01:06 I believe it's being booted from the channel. 200 seems pushing it though. I've gone down to 500 milliseconds, but after ~8 messages I get started getting a throttled message and then a kick soon after. ---------------------------------------------------------------------- benburhans · 2013-11-25 01:33 I think it is actually more lenient and less published in the past couple years, but when asked staff tend to reply with the numbers I gave as the canonical value just to be safe; hence why I labelled it only as a rule of thumb. As mentioned in another comment, asking in #freenode and getting a reply from a voiced staff member will get you an official response. ---------------------------------------------------------------------- [deleted] · 2013-11-25 01:41 You're right. It's Atheme which freenode's services package is based on that has this. ---------------------------------------------------------------------- MrZimothy · 2013-11-25 02:49 The irc RFC defines the expected behavior for non flood exempt clients. I will link later when not on my phone if you like? ---------------------------------------------------------------------- MrZimothy · 2013-11-25 02:49 The irc RFC defines the expected behavior for non flood exempt clients. I will link later when not on my phone if you like? ---------------------------------------------------------------------- Jonno_FTW · 2013-11-25 04:29 I wrote a bot like that once, it used threads all over the place and generally it was a mess. I suggest using Twisted. It will make throttling a non-issue, since it handles flooding automatically. ---------------------------------------------------------------------- wmcscrooge · 2013-11-25 05:19 > threads all over the place really? I only used two threads. The [code](https://github.com/Progether/IRC-Bot/blob/master/ircHelpers.py) (lines 20-36) creates a thread after connecting to a channel. Every message that needs to be sent is added to a queue. Every *n* seconds, the thread grabs a message from the queue and sends it to the channel. Works pretty well so far without any mess. ---------------------------------------------------------------------- [deleted] · 2013-12-04 10:21 [deleted] ---------------------------------------------------------------------- benburhans · 2013-12-04 11:10 I stand corrected on two counts: 1.) I meant to say "RecvQ" rather than "SendQ", and 2.) charybdis documentation does indeed not make mention of recvq or similar for its config file's class blocks, only sendq, and the code seems to agree that there are no obvious charybdis-enforced restrictions on recvq unless they are in other modules I am unaware of. Thanks for keeping me honest!