Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#184 Add some shortcuts for channel modes checkings + add supybot.plugins.Factoids.requireVoice

open
nobody
None
6
2013-05-25
2013-05-25
Valentin Lorentz
No

Hi,

Since plugins sometimes have to check whether they are "at least halfopped" or "at least voiced", they have to check all the modes (and sometimes forget to check halfops in the latter case).
So I added shortcuts to check that.

First, a commit I made two years ago introducing this feature in a specific case (a converter for "at least halfopped"):
https://github.com/ProgVal/Limnoria/commit/41514bafdd75f739fcc61223dadd3dc5300b2636

Then, the extension to all converters:
https://github.com/ProgVal/Limnoria/commit/ed62c9efb18432cc99151c09b1b32755d2b77c8c

And finally, the addition of other shortcuts, and usage in Factoids, with the introduction of the supybot.plugins.Factoids.requireVoice configuration variable:
https://github.com/ProgVal/Limnoria/commit/1090c4623ff601cd1f09889c2111dd460c13ffb9
https://github.com/ProgVal/Limnoria/commit/8bfea88e3f6b080530628035754d37a0b675eaa9

The configuration variable was requested by a user who wanted to restrict Factoids learning to voiced people (to prevent Factoids flood), without having to register all users.

Regards,
Valentin

Discussion