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'
def initialize(bot, dirlist)
@@bot = bot
@dirs = dirlist
+ @blacklist = Array.new
+ @@bot.config['plugins.blacklist'].each { |p|
+ @blacklist << p+".rb"
+ }
scan
end
# load plugins from pre-assigned list of directories
def scan
- processed = Array.new
+ processed = @blacklist
dirs = Array.new
dirs << Config::datadir + "/plugins"
dirs += @dirs