comparison irclib.py @ 209:c4f058ee3f77

(irclib) use an explicit leave message when auto-restarting the bot Signed-off-by: Charly COSTE <changaco@changaco.net>
author Charly COSTE <changaco@changaco.net>
date Sat, 06 Mar 2010 15:55:51 +0100
parents 1cae0d82501b
children fb0cf6bf9eab
comparison
equal deleted inserted replaced
208:1cae0d82501b 209:c4f058ee3f77
242 if hasattr(c, 'socket'): 242 if hasattr(c, 'socket'):
243 try: 243 try:
244 c.process_data() 244 c.process_data()
245 except ServerNotConnectedError: 245 except ServerNotConnectedError:
246 if c.real_nickname == self.bot.nickname: 246 if c.real_nickname == self.bot.nickname:
247 self.bot.restart() 247 self.bot.restart(message='Lost bot IRC connection')
248 else: 248 else:
249 c.disconnect(volontary=True) 249 c.disconnect(volontary=True)
250 c.connect() 250 c.connect()
251 c.lock.release() 251 c.lock.release()
252 252