From 6ee5c6dae7d761d753755c672fe7514848509cb8 Mon Sep 17 00:00:00 2001 From: mutantmonkey Date: Fri, 23 Sep 2011 00:39:58 -0400 Subject: [PATCH] another go at fixing intermittent disconnections --- bot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bot.py b/bot.py index 26d9ae6..21ba4ab 100755 --- a/bot.py +++ b/bot.py @@ -13,7 +13,7 @@ import irc home = os.getcwd() def decode(bytes): - if not bytes or type(bytes) == str: + if type(bytes) == str: return bytes try: text = bytes.decode('utf-8') @@ -205,7 +205,7 @@ class Phenny(irc.Bot): def dispatch(self, origin, args): bytes, event, args = args[0], args[1], args[2:] - text = str(bytes) + text = decode(bytes) event = decode(event) if origin.nick in self.config.ignore: