]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - lib/rbot/plugins.rb
refactor: logger moved away from ircbot (exp.)
[user/henk/code/ruby/rbot.git] / lib / rbot / plugins.rb
index d231d7f24f813fc0002a5fa03216c5b0f4ea40c9..9589b202d46487fe811749a2a3d2a876dcf5e903 100644 (file)
@@ -215,6 +215,7 @@ module Plugins
       @registry.flush
     end
 
+
     # Method called to cleanup before the plugin is unloaded. If you overload
     # this method to handle additional cleanup tasks, remember to call super()
     # so that the default cleanup actions are taken care of as well.
@@ -582,6 +583,10 @@ module Plugins
       ([str, err.inspect] + err.backtrace).join("\n")
     end
 
+    def get_plugin(name)
+      plugins.find { |plugin| plugin.name == name }
+    end
+
     # This method is the one that actually loads a module from the
     # file _fname_
     #
@@ -653,7 +658,6 @@ module Plugins
         return newerr
       end
     end
-    private :load_botmodule_file
 
     # add one or more directories to the list of directories to
     # load core modules from