Make sure app does not crash when webirc is not defined in the configuration

This commit is contained in:
Jérémie Astori 2016-05-02 01:11:57 -04:00
parent ba26724748
commit 48ce92bdcf

View File

@ -172,7 +172,7 @@ Client.prototype.connect = function(args) {
return;
}
if (config.webirc !== null && network.host in config.webirc) {
if (config.webirc && network.host in config.webirc) {
args.ip = args.ip || (client.config && client.config.ip) || client.ip;
args.hostname = args.hostname || (client.config && client.config.hostname) || client.hostname || args.ip;