From de16aae2bce12024227064efef6fe18b5332e369 Mon Sep 17 00:00:00 2001 From: Gordon Shumway <39967334+oddluck@users.noreply.github.com> Date: Mon, 23 Sep 2019 15:13:38 -0400 Subject: [PATCH] ansi2irc: strip resets --- ASCII/plugin.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ASCII/plugin.py b/ASCII/plugin.py index e7e7c78..cf90637 100644 --- a/ASCII/plugin.py +++ b/ASCII/plugin.py @@ -673,10 +673,12 @@ class ASCII(callbacks.Plugin): return '' def ansi2irc(self, output): + output = output.replace('\x1b(B\x1b[m', '') output = output.replace('\x1b(B\x1b[m', '') output = output.replace('\x1b\x1b', '\x1b') output = re.sub(r'\x1B\[[0-?]*[ -/]*[@-~]', lambda m: self.process_ansi(m.group(0)), output) output = re.sub('\x0399,(\d\d)\x03(\d\d)', '\x03\g<2>,\g<1>', output) + output = output.replace('\x0F\x03', '\x03') return output def png(self, irc, msg, args, optlist, url):