Make sure registered command is actually a function

This commit is contained in:
Pavel Djundik 2018-10-13 12:42:51 +03:00
parent a6a2336a6f
commit 338b1d2642

View File

@ -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) {