discordIRCd
discordIRCd copied to clipboard
WHOIS command: handle unknown nick
…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
This seems to happen when connecting to the DMserver using an ircServer.username different from the Discord username.