summaryrefslogtreecommitdiff
path: root/lib/rbot/ircbot.rb
diff options
context:
space:
mode:
authorMatthias H <apoc@sixserv.org>2015-03-11 08:32:16 +0100
committerMatthias H <apoc@sixserv.org>2015-03-11 08:32:16 +0100
commit63785bdaded80af35574add65958aa0df2bd5c41 (patch)
treed810e50eac426437ad3a8ed33236fb2956d799af /lib/rbot/ircbot.rb
parent6eea156b76c9b894994efc1cd5e94ede08c0443c (diff)
plugins: allow rescanning of one botmodule only
Diffstat (limited to 'lib/rbot/ircbot.rb')
-rw-r--r--lib/rbot/ircbot.rb20
1 files changed, 13 insertions, 7 deletions
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