collector= (Irc::Bot::MessageParameter)

    # File lib/rbot/messagemapper.rb, line 313
        def collector=(val)
          return unless val
          case val
          when Regexp
            return unless val.has_captures?
            @regexp = val
          when Array
            warning "Collector #{val.inspect} is too long, ignoring extra entries" unless val.length <= 2
            @regexp = val[0]
            @index = val[1] rescue nil
          when Hash
            raise "Collector #{val.inspect} doesn't have a :regexp key" unless val.has_key?(:regexp)
            @regexp = val[:regexp]
            @index = val.fetch(:regexp, nil)
          end
          raise "The regexp of collector #{val.inspect} isn't a Regexp" unless @regexp.kind_of?(Regexp)
          raise "The index of collector #{val.inspect} is present but not an integer " if @index and not @index.kind_of?(Fixnum)
        end