diff --git a/src/models/network.js b/src/models/network.js index a89dc59e..0bf59524 100644 --- a/src/models/network.js +++ b/src/models/network.js @@ -139,7 +139,7 @@ Network.prototype.createIrcFramework = function(client) { }; Network.prototype.createWebIrc = function(client) { - if (!Helper.config.webirc || !(this.host in Helper.config.webirc)) { + if (!Helper.config.webirc || !Helper.config.webirc.hasOwnProperty(this.host)) { return null; } @@ -153,7 +153,7 @@ Network.prototype.createWebIrc = function(client) { this.hostname = this.ip; } - if (Helper.config.webirc[this.host] instanceof Function) { + if (typeof Helper.config.webirc[this.host] === "function") { return Helper.config.webirc[this.host](client, this); }