# File lib/rbot/messagemapper.rb, line 167
    def items=(str)
      items = str.split(/\s+/).collect {|c| (/^(:|\*)(\w+)$/ =~ c) ? (($1 == ':' ) ? $2.intern : "*#{$2}".intern) : c} if str.kind_of?(String) # split and convert ':xyz' to symbols
      items.shift if items.first == ""
      items.pop if items.last == ""
      @items = items

      if @items.first.kind_of? Symbol
        raise ArgumentError, "Illegal template -- first component cannot be dynamic\n   #{str.inspect}"
      end

      # Verify uniqueness of each component.
      @items.inject({}) do |seen, item|
        if item.kind_of? Symbol
          # We must remove the initial * when present,
          # because the parameters hash will intern both :item and *item as :item
          it = item.to_s.sub(/^\*/,"").intern
          raise ArgumentError, "Illegal template -- duplicate item #{it} in #{str.inspect}" if seen.key? it
          seen[it] = true
        end
        seen
      end
    end