diff options
| author | 2019-06-28 23:16:05 +0100 | |
|---|---|---|
| committer | 2019-06-28 23:16:05 +0100 | |
| commit | ae9d099a41b703ce875cf8746a94b6995bbaedfb (patch) | |
| tree | c389ae3b967c43055a1c671b8cebf04db4e8f8b6 /modules/ducks.py | |
| parent | message arg for HTTPWrongContentTypeException/HTTPParsingException (diff) | |
Refactor set/channelset/serverset/botset in to 'utils.Setting' objects
Diffstat (limited to 'modules/ducks.py')
| -rw-r--r-- | modules/ducks.py | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/modules/ducks.py b/modules/ducks.py index 037c602b..afef16d2 100644 --- a/modules/ducks.py +++ b/modules/ducks.py @@ -9,15 +9,12 @@ NO_DUCK = "There was no duck!" DEFAULT_MIN_MESSAGES = 100 -@utils.export("channelset", {"setting": "ducks-enabled", - "help": "Whether or not to spawn ducks", "validate": utils.bool_or_none, - "example": "on"}) -@utils.export("channelset", {"setting": "ducks-min-messages", - "help": "Minimum messages between ducks spawning", - "validate": utils.int_or_none, "example": "50"}) -@utils.export("channelset", {"setting": "ducks-kick", - "help": "Whether or not to kick someone talking to non-existent ducks", - "validate": utils.bool_or_none, "example": "on"}) +@utils.export("channelset", utils.BoolSetting("ducks-enabled", + "Whether or not to spawn ducks")) +@utils.export("channelset", utils.IntSetting("ducks-min-messages", + "Minimum messages between ducks spawning", example="50")) +@utils.export("channelset", utils.BoolSetting("ducks-kick", + "Whether or not to kick someone talking to non-existent ducks")) class Module(ModuleManager.BaseModule): @utils.hook("new.channel") def new_channel(self, event): |
