# HG changeset patch # User Charly COSTE # Date 1269279717 -3600 # Node ID 73d6e284c18d0d757e6f2a8b84b5cf432379f3e6 # Parent db77ef37ff2c87bbc44b50690f08782c1513accc handle irclib.ServerNotConnectedError in Bridge._say_on_irc Signed-off-by: Charly COSTE diff --git a/bridge.py b/bridge.py --- a/bridge.py +++ b/bridge.py @@ -380,7 +380,11 @@ class Bridge: def _say_on_irc(self, message): - self.irc_connection.privmsg(self.irc_room, message) + try: + self.irc_connection.privmsg(self.irc_room, message) + except ServerNotConnectedError: + bridges = self.bot.iter_bridges(irc_server=self.irc_server) + self.bot.restart_bridges_delayed(bridges, 0, say_levels.error, 'Lost bot IRC connection', protocol='irc') def _say_on_xmpp(self, message):