Mercurial > xib
comparison bridge.py @ 216:d527d7b75f56
merged Bot.find_bridges and Bot.get_bridges into Bot.iter_bridges, btw we don't need to lock Bot.bridges because lists don't raise RuntimeError
Signed-off-by: Charly COSTE <changaco@changaco.net>
author | Charly COSTE <changaco@changaco.net> |
---|---|
date | Sat, 06 Mar 2010 22:55:47 +0100 |
parents | b900585bdbbb |
children | 63289aa1dea7 |
comparison
equal
deleted
inserted
replaced
215:b900585bdbbb | 216:d527d7b75f56 |
---|---|
98 self._join_irc_failed(reason) | 98 self._join_irc_failed(reason) |
99 | 99 |
100 | 100 |
101 def _RemoteServerNotFound_handler(self): | 101 def _RemoteServerNotFound_handler(self): |
102 server = xmpp.protocol.JID(self.xmpp_room_jid).getDomain() | 102 server = xmpp.protocol.JID(self.xmpp_room_jid).getDomain() |
103 bridges = self.bot.find_bridges([server]) | 103 bridges = self.bot.iter_bridges(patterns=[server]) |
104 error = [say_levels.warning, 'The MUC server '+server+' seems to be down, the bot will try to recreate all bridges related to this server in 5 minutes'] | 104 error = [say_levels.warning, 'The MUC server '+server+' seems to be down, the bot will try to recreate all bridges related to this server in 5 minutes'] |
105 self.bot.restart_bridges_delayed(bridges, 300, error) | 105 self.bot.restart_bridges_delayed(bridges, 300, error) |
106 | 106 |
107 | 107 |
108 def _xmpp_join_callback(self, errors): | 108 def _xmpp_join_callback(self, errors): |