archangelic / pinhook

the pluggable python framework for IRC bots and Twitch bots
https://archangelic.github.io/pinhook/
MIT License
31 stars 4 forks source link

Add rate limiting of message to avoid channel flooding #62

Open RussellChamp opened 5 years ago

RussellChamp commented 5 years ago

Many channels have anti flooding settings that will cause an overly-chatty bot to get kicked. Eg, 5 lines within 10 seconds. Add either an optional delay timer or max msg lines or rate limit or something to avoid getting kicked for flooding. Eg Setting flood_limit 5 and flood_time 10 will cause the bot to rate limit itself whenever pinhook.plugin.message receives more than 5 lines in the array. It could print the first 5 lines then wait 10 seconds or only print a message every 2 seconds.