make syncbot reponse to irc message ^syncbot and return it's address

This commit is contained in:
AZ Huang 2013-12-04 15:18:35 +08:00
parent da91a1ad18
commit dc94d1607c

View file

@ -81,6 +81,11 @@ class SyncBot(Tox):
if rx: if rx:
print('IRC> %s: %s' % rx.groups()) print('IRC> %s: %s' % rx.groups())
msg = '%s> %s' % rx.groups() msg = '%s> %s' % rx.groups()
if rx.group(2) == '^syncbot':
self.irc.send('PRIVMSG %s :%s\r\n' %
(CHANNEL, self.get_address()))
else:
self.send_group_msg(msg) self.send_group_msg(msg)
l = line.rstrip().split() l = line.rstrip().split()