mirror of
https://github.com/thelounge/thelounge.git
synced 2024-05-30 12:22:30 +02:00
Merge pull request #2848 from thelounge/xpaw/harden-inputs
Make sure registered command is actually a function
This commit is contained in:
commit
f1c84c1ede
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue