Skip to content
This repository has been archived by the owner on Oct 23, 2021. It is now read-only.

WHOIS command: handle unknown nick #31

Open
pacien opened this issue Jun 4, 2017 · 1 comment
Open

WHOIS command: handle unknown nick #31

pacien opened this issue Jun 4, 2017 · 1 comment

Comments

@pacien
Copy link

pacien commented Jun 4, 2017

…Instead of crashing.

                        const userID = ircDetails[socket.discordid].members[whoisUser];
                                                                           ^
TypeError: Cannot read property '<NICK>' of undefined
    at /opt/discordIRCd/server.js:1392:76
    at Array.forEach (native)
    at Socket.<anonymous> (/opt/discordIRCd/server.js:1149:19)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at readableAddChunk (_stream_readable.js:176:18)
    at Socket.Readable.push (_stream_readable.js:134:10)
    at TCP.onread (net.js:547:20)

Dictionary key is unchecked at: https://github.com/creesch/discordIRCd/blob/04e14d3/server.js#L1392

@pacien
Copy link
Author

pacien commented Jun 4, 2017

This seems to happen when connecting to the DMserver using an ircServer.username different from the Discord username.

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

No branches or pull requests

1 participant