From 63785bdaded80af35574add65958aa0df2bd5c41 Mon Sep 17 00:00:00 2001 From: Matthias H Date: Wed, 11 Mar 2015 08:32:16 +0100 Subject: plugins: allow rescanning of one botmodule only --- lib/rbot/ircbot.rb | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'lib/rbot/ircbot.rb') diff --git a/lib/rbot/ircbot.rb b/lib/rbot/ircbot.rb index 9afabb27..ab4c2cf1 100644 --- a/lib/rbot/ircbot.rb +++ b/lib/rbot/ircbot.rb @@ -1397,20 +1397,26 @@ class Bot end end - # call the save method for all of the botmodules - def save + # call the save method for all or the specified botmodule + # + # :botmodule :: + # optional botmodule to save + def save(botmodule=nil) @save_mutex.synchronize do - @plugins.save + @plugins.save(botmodule) end end - # call the rescan method for all of the botmodules - def rescan + # call the rescan method for all or just the specified botmodule + # + # :botmodule :: + # instance of the botmodule to rescan + def rescan(botmodule=nil) debug "\tstopping timer..." @timer.stop @save_mutex.synchronize do - @lang.rescan - @plugins.rescan + # @lang.rescan + @plugins.rescan(botmodule) end @timer.start end -- cgit v1.2.3