    # File lib/rbot/plugins.rb, line 584
        def scan
          @failed.clear
          @ignored.clear
          @delegate_list.clear

          processed = Hash.new

          @bot.config['plugins.blacklist'].each { |p|
            pn = p + ".rb"
            processed[pn.intern] = :blacklisted
          }

          dirs = @dirs
          dirs.each {|dir|
            if(FileTest.directory?(dir))
              d = Dir.new(dir)
              d.sort.each {|file|

                next if(file =~ /^\./)

                if processed.has_key?(file.intern)
                  @ignored << {:name => file, :dir => dir, :reason => processed[file.intern]}
                  next
                end

                if(file =~ /^(.+\.rb)\.disabled$/)
                  # GB: Do we want to do this? This means that a disabled plugin in a directory
                  #     will disable in all subsequent directories. This was probably meant
                  #     to be used before plugins.blacklist was implemented, so I think
                  #     we don't need this anymore
                  processed[$1.intern] = :disabled
                  @ignored << {:name => $1, :dir => dir, :reason => processed[$1.intern]}
                  next
                end

                next unless(file =~ /\.rb$/)

                did_it = load_botmodule_file("#{dir}/#{file}", "plugin")
                case did_it
                when Symbol
                  processed[file.intern] = did_it
                when Exception
                  @failed <<  { :name => file, :dir => dir, :reason => did_it }
                end

              }
            end
          }
          debug "finished loading plugins: #{status(true)}"
          (core_modules + plugins).each { |p|
           p.methods.grep(DEFAULT_DELEGATE_PATTERNS).each { |m|
             @delegate_list[m.intern] << p
           }
          }
          mark_priorities_dirty
        end