From ed99ca5c9d16bfdc67c82819a919e02dd8f01ffb Mon Sep 17 00:00:00 2001 From: Thomas Mannay Date: Mon, 13 Mar 2017 14:06:55 +0000 Subject: [PATCH] Fix borking of ACTION sedding --- seddy.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/seddy.py b/seddy.py index 5a3370e..ca8b54a 100644 --- a/seddy.py +++ b/seddy.py @@ -86,8 +86,12 @@ def notice(msg): send.flush() def privmsg(msg): - send.write('PRIVMSG ' + channel + ' :' + - ''.join(c for c in msg if c.isprintable()) + '\r\n') + if msg[:7] == '\x01ACTION': + send.write('PRIVMSG ' + channel + ' :' + '\x01' + + ''.join(c for c in msg if c.isprintable()) + '\x01\r\n') + else: + send.write('PRIVMSG ' + channel + ' :' + + ''.join(c for c in msg if c.isprintable()) + '\r\n') send.flush() if __name__ == "__main__":