Mercurial > xib
comparison irclib.py @ 158:73b6c8d20da7
fixed IRC.disconnect_all() (added "volontary" argument)
Signed-off-by: Charly COSTE <changaco@changaco.net>
author | Charly COSTE <changaco@changaco.net> |
---|---|
date | Tue, 19 Jan 2010 09:08:44 +0100 |
parents | 63db565438bd |
children | da2f2dc61e74 |
comparison
equal
deleted
inserted
replaced
157:ce0eb3e969a7 | 158:73b6c8d20da7 |
---|---|
262 except ServerNotConnectedError: | 262 except ServerNotConnectedError: |
263 self.bot.restart() | 263 self.bot.restart() |
264 except: | 264 except: |
265 self.bot.error('[Error] Unkonwn exception on IRC thread:\n'+traceback.format_exc(), send_to_admins=True) | 265 self.bot.error('[Error] Unkonwn exception on IRC thread:\n'+traceback.format_exc(), send_to_admins=True) |
266 | 266 |
267 def disconnect_all(self, message=""): | 267 def disconnect_all(self, message="", volontary=True): |
268 """Disconnects all connections.""" | 268 """Disconnects all connections.""" |
269 for c in self.connections: | 269 for c in self.connections: |
270 c.disconnect(message) | 270 c.disconnect(message, volontary=volontary) |
271 | 271 |
272 def add_global_handler(self, event, handler, priority=0): | 272 def add_global_handler(self, event, handler, priority=0): |
273 """Adds a global handler function for a specific event type. | 273 """Adds a global handler function for a specific event type. |
274 | 274 |
275 Arguments: | 275 Arguments: |