From dc94d1607c2b0aacdd49c7e60acfafa8b2afe04b Mon Sep 17 00:00:00 2001 From: AZ Huang Date: Wed, 4 Dec 2013 15:18:35 +0800 Subject: [PATCH] make syncbot reponse to irc message ^syncbot and return it's address --- tox-irc-sync.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tox-irc-sync.py b/tox-irc-sync.py index d6fac25..6d7c6a4 100644 --- a/tox-irc-sync.py +++ b/tox-irc-sync.py @@ -81,7 +81,12 @@ class SyncBot(Tox): if rx: print('IRC> %s: %s' % rx.groups()) msg = '%s> %s' % rx.groups() - self.send_group_msg(msg) + + if rx.group(2) == '^syncbot': + self.irc.send('PRIVMSG %s :%s\r\n' % + (CHANNEL, self.get_address())) + else: + self.send_group_msg(msg) l = line.rstrip().split() if l[0] == "PING":