osslate / irc-message

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

Prefixes aren't parsed correctly #13

Closed ghost closed 9 years ago

ghost commented 10 years ago
> ircMessage.parseMessage(":nick@kcin!user!resu@host!tsoh@host PRIVMSG #channel :message").parseHostmaskFromPrefix()
{ nickname: 'nick', username: 'kcin', hostname: 'user' }

It should be:

{ nickname: 'nick@kcin', username: 'user!resu', hostname: 'host!tsoh@host' }

Source: https://gist.github.com/grawity/7289459

osslate commented 9 years ago

Those utilities were hacked together to work for most cases, never got around to parsing the prefix correctly. Will get around to it soon; pull requests are also appreciated if you want to help out :)

osslate commented 9 years ago

This is being fixed, I've split off the prefix parser to a separate module: https://github.com/expr/irc-prefix-parser