     if line.charAt(position) is ":"
       nextspace = line.indexOf " ", position
       throw new Error "Expected command; malformed IRC message." if nextspace is -1
-      @prefix = line.substring position + 1, nextspace
+      @prefix = line.slice position + 1, nextspace
       position = nextspace + 1
       position++ while line.charAt(position) is " "
 


    if nextspace is -1
      if line.length > position
        @command = line.substring(position).toUpperCase()
      else return

    @command = line.substring(position, nextspace).toUpperCase()

    position = nextspace + 1
    position++ while line.charAt(position) is " "

    while position < line.length
      nextspace = line.indexOf " ", position
      if line.charAt(position) is ":"
        @args.push line.slice position + 1
        break

      if nextspace isnt -1
        @args.push line.slice position, nextspace
        position = nextspace + 1
        position++ while line.charAt(position) is " "
        continue

      if nextspace is -1
        @args.push line.slice position
        break
    return

