diff --git a/src/client.js b/src/client.js index fd01948f..a8502548 100644 --- a/src/client.js +++ b/src/client.js @@ -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, diff --git a/src/helper.js b/src/helper.js index fb1982b7..23c4abfb 100644 --- a/src/helper.js +++ b/src/helper.js @@ -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) {