auth_search_perm (AuthModule)

    # File lib/rbot/core/auth.rb, line 199
      def auth_search_perm(m, p)
        pattern = Regexp.new(p[:pattern].to_s)
        results = @bot.plugins.maps.select { |k, v| k.match(pattern) }
        count = results.length
        max = @bot.config['send.max_lines']
        extra = (count > max ? _(". only %{max} will be shown") : "") % { :max => max }
        m.reply _("%{count} commands found matching %{pattern}%{extra}") % {
          :count => count, :pattern => pattern, :extra => extra
        }
        return if count == 0
        results[0,max].each { |cmd, hash|
          m.reply _("%{cmd}: %{perms}") % {
            :cmd => cmd,
            :perms => hash[:auth].join(", ")
          }
        }
      end