]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - lib/rbot/ircbot.rb
plugins: allow rescanning of one botmodule only
[user/henk/code/ruby/rbot.git] / lib / rbot / ircbot.rb
index 9afabb2771976c080a925badae9588202cdb2ee1..ab4c2cf1298390ab60d160ab0269a6c362f7b3e7 100644 (file)
@@ -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