osslate / irc-message

Performant, streaming IRC message parser
BSD 2-Clause "Simplified" License
92 stars 13 forks source link

Fix parsing of commands with no params #6

Closed rickihastings closed 10 years ago

rickihastings commented 10 years ago
> new IrcMessage('nick!user@host AWAY');
{ tags: {}, 
  prefix: 'nick!user@host', 
  command: 'AWA', 
  params: [ 'nick!user@host AWAY' ] } 

Is returned when params should be equal to '', like so;

> new IrcMessage('nick!user@host AWAY :');
{ tags: {}, 
  prefix: 'nick!user@host', 
  command: 'AWAY', 
  params: [ '' ] } 
osslate commented 10 years ago

Params should be an empty array when this is the case. Will look into this now and refactor the parser.