From 0a71eb83a473ecda1a2a41d20426799365d2d653 Mon Sep 17 00:00:00 2001 From: AZ Huang Date: Sun, 6 Apr 2014 08:12:34 +0800 Subject: [PATCH] Fix repeating bug. --- tox-irc-sync.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tox-irc-sync.py b/tox-irc-sync.py index 1bcdb75..2f798c2 100644 --- a/tox-irc-sync.py +++ b/tox-irc-sync.py @@ -149,7 +149,7 @@ class SyncBot(Tox): def on_group_message(self, groupnumber, friendgroupnumber, message): name = self.group_peername(groupnumber, friendgroupnumber) - if name != NAME: + if len(name) and name != NAME: print('TOX> %s: %s' % (name, message)) if message.startswith('>'): message = '\x0309%s\x03' % message @@ -161,7 +161,7 @@ class SyncBot(Tox): def on_group_action(self, groupnumber, friendgroupnumber, action): name = self.group_peername(groupnumber, friendgroupnumber) - if name != NAME: + if len(name) and name != NAME: print('TOX> %s: %s' % (name, action)) if action.startswith('>'): action = '\x0309%s\x03' % action