comparison bridge.py @ 195:e4ceefab8ba5

fixed Bot.restart_bridges_delayed(), don't send the message to admins more than once Signed-off-by: Charly COSTE <changaco@changaco.net>
author Charly COSTE <changaco@changaco.net>
date Sun, 21 Feb 2010 16:19:25 +0100
parents c2a8586e64b5
children 4a379eb359dd
comparison
equal deleted inserted replaced
194:5af6c828c606 195:e4ceefab8ba5
45 self.irc_charsets = irc_charsets 45 self.irc_charsets = irc_charsets
46 self.irc_op = False 46 self.irc_op = False
47 self.xmpp_room_jid = xmpp_room_jid 47 self.xmpp_room_jid = xmpp_room_jid
48 self.say_level = say_level 48 self.say_level = say_level
49 self.participants = [] 49 self.participants = []
50 self.reconnecting = False
50 if mode not in self.__class__.modes: 51 if mode not in self.__class__.modes:
51 raise Exception('[Error] "'+mode+'" is not a correct value for a bridge\'s "mode" attribute') 52 raise Exception('[Error] "'+mode+'" is not a correct value for a bridge\'s "mode" attribute')
52 self.mode = mode 53 self.mode = mode
53 54
54 self.lock = threading.RLock() 55 self.lock = threading.RLock()
55 56
56 self.init2() 57 self.init2()
57 58
58 59
59 def init2(self): 60 def init2(self):
61 self.reconnecting = False
62
60 # Join XMPP room 63 # Join XMPP room
61 self.xmpp_room = xmpp.muc(self.xmpp_room_jid) 64 self.xmpp_room = xmpp.muc(self.xmpp_room_jid)
62 self.xmpp_room.join(self.bot.xmpp_c, self.bot.nickname, callback=self._xmpp_join_callback) 65 self.xmpp_room.join(self.bot.xmpp_c, self.bot.nickname, callback=self._xmpp_join_callback)
63 66
64 # Join IRC room 67 # Join IRC room