aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar jesopo2019-03-08 23:23:38 +0000
committerGravatar jesopo2019-03-08 23:23:38 +0000
commit4f74ca4c0c9a76d41d53393d9ca4bc6ed8b0607b (patch)
treea9b352d8bbd57413b1d20adf9c0c60a732dbf879
parentHandle IRCArgs being empty strings (e.g. 'PRIVMSG #test :') (diff)
signature
Handle trying to strip colours from a PRIVMSG/NOTICE that has no message
-rw-r--r--modules/strip_color.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/strip_color.py b/modules/strip_color.py
index 37ce9900..c9c444b5 100644
--- a/modules/strip_color.py
+++ b/modules/strip_color.py
@@ -8,5 +8,6 @@ class Module(ModuleManager.BaseModule):
@utils.hook("preprocess.send.notice")
def preprocess(self, event):
if event["server"].get_setting("strip-color", False):
- line = event["line"]
- line.args[-1] = utils.irc.strip_font(line.args[-1])
+ message = event["line"].args.get(-1)
+ if not message == None:
+ event["line"].args[-1] = utils.irc.strip_font(message)