diff options
| author | 2019-06-28 23:16:05 +0100 | |
|---|---|---|
| committer | 2019-06-28 23:16:05 +0100 | |
| commit | ae9d099a41b703ce875cf8746a94b6995bbaedfb (patch) | |
| tree | c389ae3b967c43055a1c671b8cebf04db4e8f8b6 /modules/sed.py | |
| parent | message arg for HTTPWrongContentTypeException/HTTPParsingException (diff) | |
Refactor set/channelset/serverset/botset in to 'utils.Setting' objects
Diffstat (limited to 'modules/sed.py')
| -rw-r--r-- | modules/sed.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/modules/sed.py b/modules/sed.py index 20e85b68..0716d04d 100644 --- a/modules/sed.py +++ b/modules/sed.py @@ -7,12 +7,10 @@ from src import ModuleManager, utils REGEX_SPLIT = re.compile("(?<!\\\\)/") REGEX_SED = re.compile("^s/") -@utils.export("channelset", {"setting": "sed", - "help": "Disable/Enable sed in a channel", - "validate": utils.bool_or_none, "example": "on"}) -@utils.export("channelset", {"setting": "sed-sender-only", - "help": "Disable/Enable sed only looking at the messages sent by the user", - "validate": utils.bool_or_none, "example": "on"}) +@utils.export("channelset", + utils.BoolSetting("sed","Disable/Enable sed in a channel")) +@utils.export("channelset", utils.BoolSetting("sed-sender-only", + "Disable/Enable sed only looking at the messages sent by the user")) class Module(ModuleManager.BaseModule): def _closest_setting(self, event, setting, default): return event["target"].get_setting(setting, |
