]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - lib/rbot/ircbot.rb
* (timer) stop the bot timer for shutdown / rescan
[user/henk/code/ruby/rbot.git] / lib / rbot / ircbot.rb
index 889daed0e64a91a96470a974317682086617e54b..46d5e902dc1066b33ba25c89ae1281a998c4c3d0 100644 (file)
@@ -1045,6 +1045,8 @@ class Bot
       # end
       debug "\tdisconnecting..."
       disconnect(message)
+      debug "\tstopping timer..."
+      @timer.stop
       debug "\tsaving ..."
       save
       debug "\tcleaning up ..."
@@ -1100,10 +1102,13 @@ class Bot
 
   # call the rescan method for all of the botmodules
   def rescan
+    debug "\tstopping timer..."
+    @timer.stop
     @save_mutex.synchronize do
       @lang.rescan
       @plugins.rescan
     end
+    @timer.start
   end
 
   # channel:: channel to join