Fix network name not being set when displayNetwork is false
This commit is contained in:
parent
ca54c40d0f
commit
81bdf7d33e
@ -187,7 +187,7 @@ Client.prototype.connect = function(args) {
|
|||||||
args.hostname = args.hostname || (client.config && client.config.hostname) || client.hostname;
|
args.hostname = args.hostname || (client.config && client.config.hostname) || client.hostname;
|
||||||
|
|
||||||
var network = new Network({
|
var network = new Network({
|
||||||
name: args.name || "",
|
name: (config.displayNetwork ? args.name : config.defaults.name) || "",
|
||||||
host: args.host || "",
|
host: args.host || "",
|
||||||
port: parseInt(args.port, 10) || (args.tls ? 6697 : 6667),
|
port: parseInt(args.port, 10) || (args.tls ? 6697 : 6667),
|
||||||
tls: !!args.tls,
|
tls: !!args.tls,
|
||||||
|
@ -7,6 +7,7 @@ var os = require("os");
|
|||||||
var fs = require("fs");
|
var fs = require("fs");
|
||||||
var net = require("net");
|
var net = require("net");
|
||||||
var bcrypt = require("bcryptjs");
|
var bcrypt = require("bcryptjs");
|
||||||
|
const colors = require("colors/safe");
|
||||||
|
|
||||||
var Helper = {
|
var Helper = {
|
||||||
config: null,
|
config: null,
|
||||||
@ -68,6 +69,12 @@ function setHome(homePath) {
|
|||||||
this.config = _.extend(this.config, userConfig);
|
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
|
// TODO: Remove in future release
|
||||||
if (this.config.debug === true) {
|
if (this.config.debug === true) {
|
||||||
log.warn("debug option is now an object, see defaults file for more information.");
|
log.warn("debug option is now an object, see defaults file for more information.");
|
||||||
|
Loading…
Reference in New Issue
Block a user