From 40ce1c01ca1113d983e9e08b1ac8614c75ec8c29 Mon Sep 17 00:00:00 2001 From: Jack Allnutt Date: Tue, 31 Jul 2012 22:57:29 +0100 Subject: [PATCH] fix for crash when command parameters is not an array --- server/client.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/client.js b/server/client.js index dd94ec4..4276043 100755 --- a/server/client.js +++ b/server/client.js @@ -64,6 +64,10 @@ var IRC_command = function (command, callback) { command.data = JSON.parse(command.data); + if (!_.isArray(command.data.args.params)){ + command.data.args.params = [command.data.args.params]; + } + if (command.data.method === 'ctcp') { if (command.data.args.request) { str += 'PRIVMSG '; -- 2.25.1