Merge pull request #1305 from thelounge/xpaw/fix-lock-and-defaults
Fix losing network settings
This commit is contained in:
commit
1b4f4ee11e
@ -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,
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user