comparison bridge.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 faa468731d8a
children b048c4c03b00
comparison
equal deleted inserted replaced
44:3d964ca1cf89 45:41394ddb3aff
42 def __init__(self, owner_bot, xmpp_room_jid, irc_room, irc_server, mode, say_level, irc_port=6667): 42 def __init__(self, owner_bot, xmpp_room_jid, irc_room, irc_server, mode, say_level, irc_port=6667):
43 """Create a new bridge.""" 43 """Create a new bridge."""
44 self.bot = owner_bot 44 self.bot = owner_bot
45 self.irc_server = irc_server 45 self.irc_server = irc_server
46 self.irc_port = irc_port 46 self.irc_port = irc_port
47 self.irc_room = irc_room 47 self.irc_room = irc_room.lower()
48 if hasattr(self.__class__, '_'+say_level): 48 if hasattr(self.__class__, '_'+say_level):
49 self.say_level = getattr(self.__class__, '_'+say_level) 49 self.say_level = getattr(self.__class__, '_'+say_level)
50 else: 50 else:
51 raise Exception('[Error] "'+say_level+'" is not a correct value for a bridge\'s "say_level" attribute') 51 raise Exception('[Error] "'+say_level+'" is not a correct value for a bridge\'s "say_level" attribute')
52 self.participants = [] 52 self.participants = []