comparison bot.py @ 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
comparison
equal deleted inserted replaced
53:a2258a705a17 54:2507f424773a
285 285
286 if event.eventtype() == 'kick' and len(event.arguments()) < 1: 286 if event.eventtype() == 'kick' and len(event.arguments()) < 1:
287 self.error('=> Debug: length of arguments should be greater than 0 for a kick event') 287 self.error('=> Debug: length of arguments should be greater than 0 for a kick event')
288 return 288 return
289 289
290 if event.eventtype() in ['pubmsg', 'action'] and nickname == self.nickname: 290 if event.eventtype() in ['pubmsg', 'action']:
291 self.error('=> Debug: ignoring IRC '+event.eventtype()+' sent by self', debug=True) 291 if connection.get_nickname() == self.nickname:
292 return 292 self.error('=> Debug: ignoring IRC '+event.eventtype()+' not received on bot connection', debug=True)
293 return
294 if nickname == self.nickname:
295 self.error('=> Debug: ignoring IRC '+event.eventtype()+' sent by self', debug=True)
296 return
293 297
294 # TODO: lock self.bridges for thread safety 298 # TODO: lock self.bridges for thread safety
295 for bridge in self.bridges: 299 for bridge in self.bridges:
296 if connection.server != bridge.irc_server: 300 if connection.server != bridge.irc_server:
297 continue 301 continue