discordIRCd icon indicating copy to clipboard operation
discordIRCd copied to clipboard

WHOIS command: handle unknown nick

Open pacien opened this issue 8 years ago • 1 comments

…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 avatar Jun 04 '17 20:06 pacien

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

pacien avatar Jun 04 '17 21:06 pacien