Private Messages and Flood Protection reddit / irc ---------------------------------------------------------------------- illuminatedtiger · 2014-10-04 14:31 I'm working on an IRC bot that takes some textual input from a user via private messages. The input is typically multi-line and can be anywhere from 10 - 100 lines. What I've noticed on the bot's end is that the data arrives very slowly and my hunch is that it's not an issue with my code but perhaps some sort of flood protection implemented by the IRCD. My target audience for the bot will be Freenode but I've tested it on a number of other networks and have noticed the same sort of behaviour. Is my current theory likely correct and if so, are there any ways of working around it? ---------------------------------------------------------------------- fedv · 2014-10-04 14:37 The IRCds freenode use (irc7) do have flood throttling. the only way to circumvent it is for them to add a connect block for your bot's hostmask in their configs. Also, if you're connecting your bot through a proxy-app, like a bouncer (znc), irssi-proxy, or any other IRC client; those will have default flood controls, make sure to turn them off. if your bot is on Snoonet, we can offer you a custom class so your bot can bypass controls. This does entirely depend on the usefulness of the bot, or how many users will depend on the bot such as trivia, other games, or RSS feed-to-IRC bots ---------------------------------------------------------------------- kellyzdude · 2014-10-04 16:23 Also worth asking, is this being developed around an existing tool (eggdrop, mIRC, countless others) or is it entirely raw? ---------------------------------------------------------------------- illuminatedtiger · 2014-10-05 00:19 The latter. ---------------------------------------------------------------------- theTrasp · 2014-10-30 00:30 My guess is that whatever library you are using for this bot have a built in protection against excess flood. This is because most IRC servers will disconnect you with the reason "Excess flood" if you attempt to send more than five messages in a row or if you don't space every following message with two seconds each. A full explanation can be found in [RFC1459 section 8.10](http://tools.ietf.org/html/rfc1459.html#section-8.10): >8.10 Flood control of clients > > With a large network of interconnected IRC servers, it is quite easy > for any single client attached to the network to supply a continuous > stream of messages that result in not only flooding the network, >but > also degrading the level of service provided to others. Rather than > require every 'victim' to be provide their own protection, flood > protection was written into the server and is applied to all clients > except services. The current algorithm is as follows: > > * check to see if client's `message timer' is less than > current time (set to be equal if it is); > > * read any data present from the client; > > * while the timer is less than ten seconds ahead of the current > time, parse any present messages and penalize the client by > 2 seconds for each message; > > which in essence means that the client may send 1 message every 2 seconds Maybe you could open up a DCC/SDCC connection to the clients to circumvent this problem, if you haven't allready come up with a solution and really want to use a IRC interface.