irc icon indicating copy to clipboard operation
irc copied to clipboard

[AIO] Excess flood prevention

Open hifi opened this issue 3 years ago • 3 comments

Regardless of the use case it is usually desired that a client/bot does not excess flood itself out of a network. This is a tricky problem to solve as networks have different ways of calculating how much is too much.

I have a downstream AIO solution that was scientifically calculated by trial-and-error on popular IRC networks with fair :game_die: rolls to land on an algorithm: https://github.com/hifi/heisenbridge/blob/master/heisenbridge/irc.py#L160

If such implementation is upstreamed it needs to be configurable and possibly off by default. Let me know if something can be worked out.

hifi avatar Jun 10 '21 05:06 hifi

Additionally it would be ideal if this queue could be pushed to the top or bottom so important commands can be prioritized first and PRIVMSG/NOTICE stuff can be flushed out later.

hifi avatar Jun 10 '21 06:06 hifi

I have now switched the downstream implementation to PriorityQueue and it seems to work great.

hifi avatar Jun 13 '21 17:06 hifi

Hey, sorry to bother you. It seems you have everything working. Might I ask you can take a quick look at https://github.com/jaraco/irc/issues/201 ? I know it's not sophisticated code since it's just me trying to figure out how everything works before making the bot in earnest. I would really appreciate it.

Splitframe avatar Nov 05 '22 12:11 Splitframe