Mercurial > xib
changeset 54:2507f424773a
Fixed a bug introduced in previous commit
Signed-off-by: Charly COSTE <changaco@changaco.net>
author | Charly COSTE <changaco@changaco.net> |
---|---|
date | Wed, 26 Aug 2009 20:06:26 +0200 |
parents | a2258a705a17 |
children | c09f9523fe2e |
files | bot.py |
diffstat | 1 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/bot.py +++ b/bot.py @@ -287,9 +287,13 @@ class bot(Thread): self.error('=> Debug: length of arguments should be greater than 0 for a kick event') return - if event.eventtype() in ['pubmsg', 'action'] and nickname == self.nickname: - self.error('=> Debug: ignoring IRC '+event.eventtype()+' sent by self', debug=True) - return + if event.eventtype() in ['pubmsg', 'action']: + if connection.get_nickname() == self.nickname: + self.error('=> Debug: ignoring IRC '+event.eventtype()+' not received on bot connection', debug=True) + return + if nickname == self.nickname: + self.error('=> Debug: ignoring IRC '+event.eventtype()+' sent by self', debug=True) + return # TODO: lock self.bridges for thread safety for bridge in self.bridges: