gf3 / IRC-js

The best IRC library for node.js
http://irc-js.com
The Unlicense
179 stars 33 forks source link

Pipe character in username makes my bot error out #37

Closed thejh closed 13 years ago

thejh commented 13 years ago
[RECV]  :der|!~der|@xxx.xxx.xxx.xxx PRIVMSG #Node.js :foo
[ERROR] Failed parsing ':der|!~der|@xxx.xxx.xxx.xxx PRIVMSG #Node.js :foo'
TypeError: Cannot read property 'command' of undefined
    at IRC.parseMessage (/home/jann/gitty/IRC-js/lib/irc.js:134:28)
    at Socket.<anonymous> (native)
    at Socket.emit (events.js:64:17)
    at Socket._onReadable (net.js:673:31)
    at IOWatcher.onReadable [as callback] (net.js:177:10)

As a nick ending with the pipe character doesn't cause these problems, I suspect that it's because of the username. Could you change the grammar so that it works?

gf3 commented 13 years ago

Good catch, thank you!