summaryrefslogtreecommitdiff
path: root/logbot.py
diff options
context:
space:
mode:
authorChris Oliver <excid3@gmail.com>2012-09-17 14:23:18 -0500
committerChris Oliver <excid3@gmail.com>2012-09-17 14:23:18 -0500
commitdb3f3ea3086cb48d0f1a5b940d7ee182f6839513 (patch)
treed8b511f8a76b4d2af1fd871df0ce0a0cc5827c6f /logbot.py
parenta8b5642c127e1a442e212afd9942b9f781db09af (diff)
downloadlogbot-db3f3ea3086cb48d0f1a5b940d7ee182f6839513.tar.xz
Strip ASCII color codes from messages. Fixes #18
Diffstat (limited to 'logbot.py')
-rwxr-xr-xlogbot.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/logbot.py b/logbot.py
index c8411d2..73a3200 100755
--- a/logbot.py
+++ b/logbot.py
@@ -211,6 +211,7 @@ class Logbot(SingleServerIRCBot):
else:
chans = event.target()
msg = self.format_event(name, event, params)
+ msg = re.sub(r'\[(\d{1,2})m', '', msg)
msg = urlify2(msg)
# In case there are still events that don't supply a channel name (like /quit and /nick did)