Mercurial > xib
comparison bot.py @ 220:5726a0833537
minor syntax change in bot.py
Signed-off-by: Charly COSTE <changaco@changaco.net>
author | Charly COSTE <changaco@changaco.net> |
---|---|
date | Sun, 07 Mar 2010 12:37:36 +0100 |
parents | 63289aa1dea7 |
children | 1a82d5d40d90 |
comparison
equal
deleted
inserted
replaced
219:63289aa1dea7 | 220:5726a0833537 |
---|---|
463 self.error(1, 'ignoring IRC '+event.eventtype(), debug=True) | 463 self.error(1, 'ignoring IRC '+event.eventtype(), debug=True) |
464 return | 464 return |
465 | 465 |
466 | 466 |
467 nickname = None | 467 nickname = None |
468 if event.source() != None: | 468 if event.source() and '!' in event.source(): |
469 if '!' in event.source(): | 469 nickname = event.source().split('!')[0] |
470 nickname = event.source().split('!')[0] | |
471 | 470 |
472 | 471 |
473 # A string representation of the event | 472 # A string representation of the event |
474 event_str = '\nconnection='+connection.__str__()+'\neventtype='+event.eventtype()+'\nsource='+repr(event.source())+'\ntarget='+repr(event.target())+'\narguments='+repr(event.arguments()) | 473 event_str = '\nconnection='+connection.__str__()+'\neventtype='+event.eventtype()+'\nsource='+repr(event.source())+'\ntarget='+repr(event.target())+'\narguments='+repr(event.arguments()) |
475 debug_str = 'Received IRC event.'+event_str | 474 debug_str = 'Received IRC event.'+event_str |