From 40286eeafca98b04ce1805c90d33e4bb7b7a5bc5 Mon Sep 17 00:00:00 2001 From: "Brian S. Stephan" Date: Sun, 25 Apr 2021 23:19:18 -0500 Subject: [PATCH] replace IRC color codes with nothing --- ircbot/bot.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ircbot/bot.py b/ircbot/bot.py index 4a8f553..07d6343 100644 --- a/ircbot/bot.py +++ b/ircbot/bot.py @@ -901,6 +901,8 @@ class IRCBot(irc.client.SimpleIRCClient): if self.connection.server_config.replace_irc_control_with_markdown: log.debug("old replystr: %s", replystr) replystr = replystr.replace('\x02', '**') + replystr = replystr.replace('\x0F', '') + replystr = re.sub('\x03..', '', replystr) log.debug("new replystr: %s", replystr) log.debug("replypath: %s", replypath)