From ae9d099a41b703ce875cf8746a94b6995bbaedfb Mon Sep 17 00:00:00 2001 From: jesopo Date: Fri, 28 Jun 2019 23:16:05 +0100 Subject: Refactor set/channelset/serverset/botset in to 'utils.Setting' objects --- modules/strip_color.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'modules/strip_color.py') diff --git a/modules/strip_color.py b/modules/strip_color.py index 28288209..736d066e 100644 --- a/modules/strip_color.py +++ b/modules/strip_color.py @@ -2,12 +2,10 @@ from src import ModuleManager, utils -@utils.export("serverset", {"setting": "strip-color", - "help": "Set whether I strip colors from my messages on this server", - "validate": utils.bool_or_none, "example": "on"}) -@utils.export("channelset", {"setting": "strip-color", - "help": "Set whether I strip colors from my messages on in this channel", - "validate": utils.bool_or_none, "example": "on"}) +@utils.export("serverset", utils.BoolSetting("strip-color", + "Set whether I strip colors from my messages on this server")) +@utils.export("channelset", utils.BoolSetting("strip-color", + "Set whether I strip colors from my messages on in this channel")) class Module(ModuleManager.BaseModule): @utils.hook("preprocess.send.privmsg") @utils.hook("preprocess.send.notice") -- cgit v1.3.1-10-gc9f91