pipoteam / pipobot

A modular bot for Jabber MUCs.
16 stars 9 forks source link

flood #15

Open nim65s opened 9 years ago

nim65s commented 9 years ago

What do you think about automatically answering in private when the answer is too large (ie. > 3 lines) ?

Of course, it should be customisable by the modules…

sleduc commented 9 years ago

While I am not sure I would use this feature personnaly, it would not be the first "arguably usefull" feature of this bot :) One simple way to to this would be : https://gist.github.com/sleduc/1df7f86daec44a0469b9 (code patch + configuration example, based on the head of the python3 branch, but this should be easy to adapt for master).

A better (and more interesting) way to do this might be to extend the post_hook mechanism to allow it to have a parameter : https://gist.github.com/sleduc/22055565c9f168b38ef4

While the first has the advantage of the simplicity of its configuration, the second uses the post_hook mechanism already in place, extending it to have parameters so it could be used in some other context...