Make sure registered command is actually a function
This commit is contained in:
parent
a6a2336a6f
commit
338b1d2642
@ -354,7 +354,7 @@ Client.prototype.inputLine = function(data) {
|
|||||||
const irc = target.network.irc;
|
const irc = target.network.irc;
|
||||||
let connected = irc && irc.connection && irc.connection.connected;
|
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];
|
const plugin = inputs[cmd];
|
||||||
|
|
||||||
if (connected || plugin.allowDisconnected) {
|
if (connected || plugin.allowDisconnected) {
|
||||||
|
Loading…
Reference in New Issue
Block a user