Mercurial > xib
comparison bot.py @ 45:41394ddb3aff
Lower before comparing strings.
Signed-off-by: Charly COSTE <changaco@changaco.net>
author | Charly COSTE <changaco@changaco.net> |
---|---|
date | Mon, 24 Aug 2009 20:32:48 +0200 |
parents | 3d964ca1cf89 |
children | d29171ab2df1 |
comparison
equal
deleted
inserted
replaced
44:3d964ca1cf89 | 45:41394ddb3aff |
---|---|
312 if connection.get_nickname() != self.nickname: | 312 if connection.get_nickname() != self.nickname: |
313 self.error('=> Debug: ignoring IRC '+event.eventtype()+' not received on bridge connection', debug=True) | 313 self.error('=> Debug: ignoring IRC '+event.eventtype()+' not received on bridge connection', debug=True) |
314 continue | 314 continue |
315 | 315 |
316 # Leaving events | 316 # Leaving events |
317 if event.eventtype() == 'quit' or event.eventtype() == 'part' and event.target() == bridge.irc_room: | 317 if event.eventtype() == 'quit' or event.eventtype() == 'part' and event.target().lower() == bridge.irc_room: |
318 if len(event.arguments()) > 0: | 318 if len(event.arguments()) > 0: |
319 leave_message = event.arguments()[0] | 319 leave_message = event.arguments()[0] |
320 elif event.eventtype() == 'quit': | 320 elif event.eventtype() == 'quit': |
321 leave_message = 'Left server.' | 321 leave_message = 'Left server.' |
322 elif event.eventtype() == 'part': | 322 elif event.eventtype() == 'part': |
335 continue | 335 continue |
336 | 336 |
337 | 337 |
338 # Chan message | 338 # Chan message |
339 if event.eventtype() in ['pubmsg', 'action']: | 339 if event.eventtype() in ['pubmsg', 'action']: |
340 if bridge.irc_room == event.target() and bridge.irc_server == connection.server: | 340 if bridge.irc_room == event.target().lower() and bridge.irc_server == connection.server: |
341 self.error(event_str, debug=True) | 341 self.error(event_str, debug=True) |
342 message = event.arguments()[0] | 342 message = event.arguments()[0] |
343 if event.eventtype() == 'action': | 343 if event.eventtype() == 'action': |
344 message = '/me '+message | 344 message = '/me '+message |
345 from_.sayOnXMPP(message) | 345 from_.sayOnXMPP(message) |