Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Random crash after rpl_luserunknown #342

Closed
clux opened this issue Apr 4, 2015 · 3 comments
Closed

Random crash after rpl_luserunknown #342

clux opened this issue Apr 4, 2015 · 3 comments

Comments

@clux
Copy link

clux commented Apr 4, 2015

Got this crash while starting an irc bot today:

4 Apr 12:26:18 - SEND: NICK wolfram
4 Apr 12:26:18 - SEND: USER alpha 8 * wolfram
4 Apr 12:26:18 - SEND: PONG 2918491847
4 Apr 12:26:27 - Unhandled message: { prefix: 'underworld1.no.quakenet.org',
server: 'underworld1.no.quakenet.org',
command: 'rpl_luserunknown',
rawCommand: '253',
commandType: 'reply',
args: [ 'wolfram', '3', 'unknown connection(s)' ] }
4 Apr 12:26:27 - GOT NOTICE from the server: "Highest connection count: 4854 (4853 clients)"

/home/clux/repos/irc-stream/node_modules/irc/lib/parse_message.js:39
message.command = match[1];
^
TypeError: Cannot read property '1' of null
at parseMessage (/home/clux/repos/irc-stream/node_modules/irc/lib/parse_message.js:39:28)
at iterator (/home/clux/repos/irc-stream/node_modules/irc/lib/irc.js:753:27)
at Array.forEach (native)
at Socket. (/home/clux/repos/irc-stream/node_modules/irc/lib/irc.js:752:15)
at Socket.emit (events.js:95:17)
at Socket. (stream_readable.js:764:14)
at Socket.emit (events.js:92:17)
at emitReadable
(_stream_readable.js:426:10)
at emitReadable (_stream_readable.js:422:5)
at readableAddChunk (_stream_readable.js:165:9)

I am binding to the error event, and judging by the debug log, it is after that. [email protected]
Maybe some corner case in your regex?

@brentnk
Copy link

brentnk commented Apr 6, 2015

Pull #318 addresses this issue. I don't think that the fix has been pushed to npm though so you'll have to install directly from Github for the latest version.
"irc": "git://github.com/martynsmith/node-irc" should do it.

@clux
Copy link
Author

clux commented Apr 7, 2015

Ok thank you :)

@jirwin
Copy link
Collaborator

jirwin commented Apr 15, 2015

#318 was merged and published. Closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants