# HG changeset patch # User Charly COSTE # Date 1263569089 -3600 # Node ID b13ca9cefe1c30311ee74e4b6b6a9ea65f80ff4f # Parent e1e66c563d08302965df465c417ce6ccb4ce5866 tried to fix the halt command (added Bot.stop()) Signed-off-by: Charly COSTE diff --git a/bot.py b/bot.py --- a/bot.py +++ b/bot.py @@ -919,7 +919,7 @@ class Bot(threading.Thread): self.restart() return elif command == 'halt': - self.__del__() + self.stop() return @@ -996,6 +996,10 @@ class Bot(threading.Thread): self.error(error_message, send_to_admins=True) - def __del__(self): + def stop(self, message='Stopping bot'): for bridge in self.bridges: - self.removeBridge(bridge) + self.removeBridge(bridge, message=message) + + + def __del__(self): + self.stop()