From 4f74ca4c0c9a76d41d53393d9ca4bc6ed8b0607b Mon Sep 17 00:00:00 2001 From: jesopo Date: Fri, 8 Mar 2019 23:23:38 +0000 Subject: [PATCH] Handle trying to strip colours from a PRIVMSG/NOTICE that has no message --- modules/strip_color.py | 5 +++-- 1 file 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)