From 96f214843f3e667b0a34955b0632ca834bb9ecfe Mon Sep 17 00:00:00 2001 From: Dmitry Kim Date: Thu, 30 Aug 2007 18:16:19 +0000 Subject: * (ircbot) block autosave timer during rescan/restart --- lib/rbot/ircbot.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/rbot') diff --git a/lib/rbot/ircbot.rb b/lib/rbot/ircbot.rb index 889daed0..507fa907 100644 --- a/lib/rbot/ircbot.rb +++ b/lib/rbot/ircbot.rb @@ -1048,6 +1048,7 @@ class Bot debug "\tsaving ..." save debug "\tcleaning up ..." + @timer.block(@save_timer) if @save_timer @save_mutex.synchronize do @plugins.cleanup end @@ -1100,10 +1101,12 @@ class Bot # call the rescan method for all of the botmodules def rescan + @timer.block(@save_timer) if @save_timer @save_mutex.synchronize do @lang.rescan @plugins.rescan end + @timer.unblock(@save_timer) if config['core.save_every'] > 0 end # channel:: channel to join -- cgit v1.2.3