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

Crash when using NAMES command #163

Closed
butterscotchstallion opened this issue Apr 20, 2013 · 5 comments
Closed

Crash when using NAMES command #163

butterscotchstallion opened this issue Apr 20, 2013 · 5 comments

Comments

@butterscotchstallion
Copy link

I'm trying to retrieve a list of users in a given channel using the NAMES command.

Here is some code with a stack trace:

https://gist.github.com/prgmrbill/5427395

Can anyone confirm whether this is a bug or something I'm doing wrong?

@katanacrimson
Copy link
Contributor

Looks like a parsing bug. Relevant code: https://github.com/martynsmith/node-irc/blob/master/lib/irc.js#L299

Involves the reply from the server, so it's not on you I think. Might be server-specific failure though, failure to follow RFC.

Add a listener onto the "raw" event like so, and get some debug info on this event.

ircInstance.on('raw', function(message) {
    if(message.command == 'rpl_namreply')
        console.dir(message.args)
})

@butterscotchstallion
Copy link
Author

Thanks for taking a look! Here's the output:

[ 'NODEBOT', '=', '#nodebot', 'NODEBOT ndebot @BILLVUS ' ]

Additional information: this is on irc.slashnet.org which runs Unreal IRCD

@katanacrimson
Copy link
Contributor

Did it crash that second time? Looking at it, you've got four args...

ed: wait, damn it. Because of FIFO, you probably won't see the problem without editing the module itself. please do so, edit around line 299 to add in that console.dir of message.args so you can obtain that before the crash.

@butterscotchstallion
Copy link
Author

Well, I'm not sure what I changed but it seems I'm unable to reproduce the error now. I'll reopen if I'm able to narrow down exactly what causes it.

@katanacrimson
Copy link
Contributor

@prgmrbill I would wager it's related to the server itself. Something makes me think that it sent an extra line that it didn't need to, where the fourth args param was blank/undefined (and instead it should have sent rpl_endofnames). I would suggest contacting the server operator about it.

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

2 participants