Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AIO] Excess flood prevention #188

Open
hifi opened this issue Jun 10, 2021 · 3 comments
Open

[AIO] Excess flood prevention #188

hifi opened this issue Jun 10, 2021 · 3 comments

Comments

@hifi
Copy link

hifi commented Jun 10, 2021

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 🎲 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 hifi changed the title Excess flood prevention [AIO] Excess flood prevention Jun 10, 2021
@hifi
Copy link
Author

hifi commented Jun 10, 2021

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
Copy link
Author

hifi commented Jun 13, 2021

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

@Splitframe
Copy link

Hey, sorry to bother you. It seems you have everything working. Might I ask you can take a quick look at #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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants