diff options
Diffstat (limited to 'server/src/commands/core/join.js')
-rw-r--r-- | server/src/commands/core/join.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/server/src/commands/core/join.js b/server/src/commands/core/join.js index 6a65851..609e39d 100644 --- a/server/src/commands/core/join.js +++ b/server/src/commands/core/join.js @@ -32,14 +32,18 @@ exports.run = async (core, server, socket, data) => { return; } - let channel = String(data.channel).trim(); + if (typeof data.channel !== 'string' || typeof data.nick !== 'string') { + return; + } + + let channel = data.channel.trim(); if (!channel) { // Must join a non-blank channel return; } // Process nickname - let nick = String(data.nick); + let nick = data.nick; let nickArray = nick.split('#', 2); nick = nickArray[0].trim(); |