diff --git a/src/client.js b/src/client.js index 61f60ca9..f483d514 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: args.name || "", + name: (config.displayNetwork ? args.name : 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 552b11ad..fb1982b7 100644 --- a/src/helper.js +++ b/src/helper.js @@ -7,6 +7,7 @@ var os = require("os"); var fs = require("fs"); var net = require("net"); var bcrypt = require("bcryptjs"); +const colors = require("colors/safe"); var Helper = { config: null, @@ -68,6 +69,12 @@ function setHome(homePath) { this.config = _.extend(this.config, userConfig); } + if (!this.config.displayNetwork && !this.config.lockNetwork) { + this.config.lockNetwork = true; + + log.warn(`${colors.bold("displayNetwork")} and ${colors.bold("lockNetwork")} are false, setting ${colors.bold("lockNetwork")} to true.`); + } + // TODO: Remove in future release if (this.config.debug === true) { log.warn("debug option is now an object, see defaults file for more information.");