shizmob / pydle

An IRCv3-compliant Python 3 IRC library.
BSD 3-Clause "New" or "Revised" License
153 stars 47 forks source link

Flood model needs some re-thinking #28

Open shizmob opened 8 years ago

shizmob commented 8 years ago

Currently, pydle's flood model is very limited in its possibilites:

dewiniaid commented 8 years ago

I didn't realize pydle even had a flood control model until I saw this issue -- after implementing my own solution in an IRC bot framework I'm working on.

I wrote a solution here that you're welcome to adopt, though it probably needs some improvements to play nicer with asyncio and hasn't been extensively tested. That said, the basic concept is:

dewiniaid commented 8 years ago

Updated link with a different, cleaner implementation:

https://github.com/dewiniaid/pydle-ircbot/blob/b85cb5bed4113099bab36be93a283a7daeb0088a/util.py#L34