From d7290ca7b0e730bd31db41d0fb5b54370e53fd82 Mon Sep 17 00:00:00 2001 From: Juhani Haverinen Date: Tue, 18 Mar 2014 18:10:02 +0200 Subject: [PATCH] Extend functionality for all bytes < 0x20 --- ircbot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ircbot.py b/ircbot.py index 0acda49..1d11ad9 100755 --- a/ircbot.py +++ b/ircbot.py @@ -130,7 +130,7 @@ class Loghandler(threading.Thread): while True: s=self.inpc.recv() if s=='QUIT': break - sys.stdout.write(s.replace('\x1b','^[')) + sys.stdout.write(''.join([i if ord(i)>=32 or i=='\n' else '^'+chr(ord(i)+64) for i in s])) class Threadwrapper(threading.Thread): def __init__(self,func,arg):