From d82c18ffdabbcfa332ed89a9d079eceeeca6a452 Mon Sep 17 00:00:00 2001 From: AZ Huang Date: Thu, 20 Feb 2014 09:17:17 +0000 Subject: [PATCH] Allow passing through message with ^ as prefix --- tox-irc-sync.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tox-irc-sync.py b/tox-irc-sync.py index 45ad150..e78dacb 100644 --- a/tox-irc-sync.py +++ b/tox-irc-sync.py @@ -150,7 +150,11 @@ class SyncBot(Tox): if message.startswith('>'): message = ('\x039%s\x03' % message) print('TOX> %s: %s' % (name, message)) - self.irc_send('PRIVMSG %s :[%s]: %s\r\n' % (CHANNEL, name, message)) + if message.startswith('^'): + self.irc_send('PRIVMSG %s :%s\r\n' % (CHANNEL, message)) + else: + self.irc_send('PRIVMSG %s :[%s]: %s\r\n' % + (CHANNEL, name, message)) def on_group_action(self, groupnumber, friendgroupnumber, action): if action != self.sent: