Fix losing network name when displayNetwork is false

This commit is contained in:
Pavel Djundik 2017-07-06 15:00:53 +03:00
parent 23b2f7197c
commit f3a4ed8e52

View File

@ -187,7 +187,7 @@ Client.prototype.connect = function(args) {
args.hostname = args.hostname || (client.config && client.config.hostname) || client.hostname;
var network = new Network({
name: (config.displayNetwork ? args.name : config.defaults.name) || "",
name: args.name || (config.displayNetwork ? "" : config.defaults.name) || "",
host: args.host || "",
port: parseInt(args.port, 10) || (args.tls ? 6697 : 6667),
tls: !!args.tls,