Merge pull request #1305 from thelounge/xpaw/fix-lock-and-defaults

Fix losing network settings
This commit is contained in:
Jérémie Astori 2017-07-06 18:46:57 -04:00 committed by GitHub
commit 1b4f4ee11e
2 changed files with 2 additions and 2 deletions

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,

View File

@ -66,7 +66,7 @@ function setHome(homePath) {
// Reload config from new home location
if (fs.existsSync(this.CONFIG_PATH)) {
var userConfig = require(this.CONFIG_PATH);
this.config = _.extend(this.config, userConfig);
this.config = _.merge(this.config, userConfig);
}
if (!this.config.displayNetwork && !this.config.lockNetwork) {