summaryrefslogtreecommitdiff
path: root/lib/rbot/ircbot.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rbot/ircbot.rb')
-rw-r--r--lib/rbot/ircbot.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/rbot/ircbot.rb b/lib/rbot/ircbot.rb
index d83a5fe4..f5250b9b 100644
--- a/lib/rbot/ircbot.rb
+++ b/lib/rbot/ircbot.rb
@@ -809,7 +809,9 @@ class IrcBot
debug "Saving"
save
debug "Cleaning up"
- @plugins.cleanup
+ @save_mutex.synchronize do
+ @plugins.cleanup
+ end
# debug "Closing registries"
# @registry.close
debug "Cleaning up the db environment"
@@ -848,8 +850,10 @@ class IrcBot
# call the rescan method for all of the botmodules
def rescan
- @lang.rescan
- @plugins.rescan
+ @save_mutex.synchronize do
+ @lang.rescan
+ @plugins.rescan
+ end
end
# channel:: channel to join