diff --git a/tox-irc-sync.py b/tox-irc-sync.py index 14fa6bc..d0e7079 100644 --- a/tox-irc-sync.py +++ b/tox-irc-sync.py @@ -151,6 +151,8 @@ class SyncBot(Tox): name = self.group_peername(groupnumber, friendgroupnumber) if name != NAME: print('TOX> %s: %s' % (name, message)) + if message.startswith('>'): + message = '\x0309%s\03' % message if message.startswith('^'): self.irc_send('PRIVMSG %s :%s\r\n' % (CHANNEL, message)) self.handle_command(message) @@ -161,8 +163,9 @@ class SyncBot(Tox): def on_group_action(self, groupnumber, friendgroupnumber, action): name = self.group_peername(groupnumber, friendgroupnumber) if name != NAME: - name = self.group_peername(groupnumber, friendgroupnumber) print('TOX> %s: %s' % (name, action)) + if action.startswith('>'): + action = '\x0309%s\03' % action self.irc_send('PRIVMSG %s :\x01ACTION [%s]: %s\x01\r\n' % (CHANNEL, name, action))