--- plugins.rb.20060720 Thu Jul 20 21:50:27 2006 +++ plugins.rb Sat Jul 22 16:31:09 2006 @@ -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 @@ def initialize(bot, dirlist) @@bot = bot @dirs = dirlist + @blacklist = Array.new + @config['plugins.blacklist'].each { |p| + @blacklist << p+".rb" + } scan end @@ -183,7 +190,7 @@ # load plugins from pre-assigned list of directories def scan - processed = Array.new + processed = @blacklist dirs = Array.new dirs << Config::datadir + "/plugins" dirs += @dirs