diff options
| author | 2019-12-10 05:27:35 +0000 | |
|---|---|---|
| committer | 2019-12-10 05:27:35 +0000 | |
| commit | 638eee0d685c06d258cb55287204ca97bca7c344 (patch) | |
| tree | 33442439317ae2846f1efb7674b7a3758c8990a1 /modules/strip_color.py | |
| parent | move sys.exit() codes to an enum in utils.consts (diff) | |
move core modules to src/core_modules, make them uneffected by white/black list
Diffstat (limited to 'modules/strip_color.py')
| -rw-r--r-- | modules/strip_color.py | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/modules/strip_color.py b/modules/strip_color.py deleted file mode 100644 index 736d066e..00000000 --- a/modules/strip_color.py +++ /dev/null @@ -1,22 +0,0 @@ -#--depends-on config - -from src import ModuleManager, utils - -@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") - def preprocess(self, event): - if len(event["line"].args) > 1: - strip_color = event["server"].get_setting("strip-color", False) - target = event["line"].args[0] - if not strip_color and target in event["server"].channels: - channel = event["server"].channels.get(target) - strip_color = channel.get_setting("strip-color", False) - - if strip_color: - message = event["line"].args[1] - event["line"].args[1] = utils.irc.strip_font(message) |
