# HG changeset patch # User Charly COSTE # Date 1251138768 -7200 # Node ID 41394ddb3affb1b19ed1110c34cff6ec1eedb8f2 # Parent 3d964ca1cf89d5bc33877fecdd40e9e4b7125b33 Lower before comparing strings. Signed-off-by: Charly COSTE diff --git a/bot.py b/bot.py --- a/bot.py +++ b/bot.py @@ -314,7 +314,7 @@ class bot(Thread): continue # Leaving events - if event.eventtype() == 'quit' or event.eventtype() == 'part' and event.target() == bridge.irc_room: + if event.eventtype() == 'quit' or event.eventtype() == 'part' and event.target().lower() == bridge.irc_room: if len(event.arguments()) > 0: leave_message = event.arguments()[0] elif event.eventtype() == 'quit': @@ -337,7 +337,7 @@ class bot(Thread): # Chan message if event.eventtype() in ['pubmsg', 'action']: - if bridge.irc_room == event.target() and bridge.irc_server == connection.server: + if bridge.irc_room == event.target().lower() and bridge.irc_server == connection.server: self.error(event_str, debug=True) message = event.arguments()[0] if event.eventtype() == 'action': diff --git a/bridge.py b/bridge.py --- a/bridge.py +++ b/bridge.py @@ -44,7 +44,7 @@ class bridge: self.bot = owner_bot self.irc_server = irc_server self.irc_port = irc_port - self.irc_room = irc_room + self.irc_room = irc_room.lower() if hasattr(self.__class__, '_'+say_level): self.say_level = getattr(self.__class__, '_'+say_level) else: