From 338b1d2642611238b672c304fd3a9b35af264eba Mon Sep 17 00:00:00 2001 From: Pavel Djundik Date: Sat, 13 Oct 2018 12:42:51 +0300 Subject: [PATCH] Make sure registered command is actually a function --- src/client.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client.js b/src/client.js index 9d555877..8a2a009e 100644 --- a/src/client.js +++ b/src/client.js @@ -354,7 +354,7 @@ Client.prototype.inputLine = function(data) { const irc = target.network.irc; let connected = irc && irc.connection && irc.connection.connected; - if (cmd in inputs) { + if (inputs.hasOwnProperty(cmd) && typeof inputs[cmd].input === "function") { const plugin = inputs[cmd]; if (connected || plugin.allowDisconnected) {