comparison bot.py @ 50:dbb7c29a71e2

Ignore messages sent by self Signed-off-by: Charly COSTE <changaco@changaco.net>
author Charly COSTE <changaco@changaco.net>
date Tue, 25 Aug 2009 02:22:43 +0200
parents 714e78fb912e
children 2737ed5b9003
comparison
equal deleted inserted replaced
49:714e78fb912e 50:dbb7c29a71e2
274 handled = False 274 handled = False
275 275
276 if event.eventtype() in ['quit', 'part', 'nick']: 276 if event.eventtype() in ['quit', 'part', 'nick']:
277 self.error(event_str, debug=True) 277 self.error(event_str, debug=True)
278 278
279 if event.eventtype() in ['pubmsg', 'action'] and nickname == self.nickname:
280 self.error('=> Debug: ignoring IRC '+event.eventtype()+' sent by self', debug=True)
281 return
282
279 # TODO: lock self.bridges for thread safety 283 # TODO: lock self.bridges for thread safety
280 for bridge in self.bridges: 284 for bridge in self.bridges:
281 if connection.server != bridge.irc_server: 285 if connection.server != bridge.irc_server:
282 continue 286 continue
283 287