summaryrefslogtreecommitdiff
path: root/lib/rbot
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rbot')
-rw-r--r--lib/rbot/plugins.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/rbot/plugins.rb b/lib/rbot/plugins.rb
index bc522300..8ac3341d 100644
--- a/lib/rbot/plugins.rb
+++ b/lib/rbot/plugins.rb
@@ -1,4 +1,7 @@
module Irc
+ BotConfig.register BotConfigArrayValue.new('plugins.blacklist',
+ :default => [], :wizard => false, :requires_restart => true,
+ :desc => "Plugins that should not be loaded")
module Plugins
require 'rbot/messagemapper'
@@ -168,6 +171,10 @@ module Plugins
def initialize(bot, dirlist)
@@bot = bot
@dirs = dirlist
+ @blacklist = Array.new
+ @@bot.config['plugins.blacklist'].each { |p|
+ @blacklist << p+".rb"
+ }
scan
end
@@ -183,7 +190,7 @@ module Plugins
# load plugins from pre-assigned list of directories
def scan
- processed = Array.new
+ processed = @blacklist
dirs = Array.new
dirs << Config::datadir + "/plugins"
dirs += @dirs