diff irclib.py @ 155:63db565438bd

fixed the halt command Signed-off-by: Charly COSTE <changaco@changaco.net>
author Charly COSTE <changaco@changaco.net>
date Sun, 17 Jan 2010 23:24:00 +0100
parents 332bb2e8e71e
children 73b6c8d20da7
line wrap: on
line diff
--- a/irclib.py
+++ b/irclib.py
@@ -254,6 +254,9 @@ class IRC:
             timeout -- Parameter to pass to process_once.
         """
         while 1:
+            if self.bot.halt:
+                self.disconnect_all(message='Stopping bot')
+                break
             try:
                 self.process_once(timeout)
             except ServerNotConnectedError: