From: Darren Date: Tue, 2 Oct 2012 16:48:25 +0000 (+0100) Subject: Server crash on connecting twice fix X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=40af34d40a74ff044c8be6880b8dedbd6a9109d4;p=KiwiIRC.git Server crash on connecting twice fix --- diff --git a/server/client.js b/server/client.js index e71d6c9..4b31da7 100755 --- a/server/client.js +++ b/server/client.js @@ -60,9 +60,9 @@ var handleClientMessage = function (msg, callback) { // Make sure we have a server number specified if ((msg.server === null) || (typeof msg.server !== 'number')) { - return callback('server not specified'); + return (typeof callback === 'function') ? callback('server not specified') : undefined; } else if (!this.IRC_connections[msg.server]) { - return callback('not connected to server'); + return (typeof callback === 'function') ? callback('not connected to server') : undefined; } // The server this command is directed to