mirror of
https://github.com/thelounge/thelounge
synced 2024-11-10 06:34:21 +00:00
Fix network name not being set when displayNetwork is false
This commit is contained in:
parent
ca54c40d0f
commit
81bdf7d33e
2 changed files with 8 additions and 1 deletions
|
@ -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,
|
||||
|
|
|
@ -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.");
|
||||
|
|
Loading…
Reference in a new issue