Use ISUPPORT NETWORK if user hasn't specified custom name

This commit is contained in:
Simon Ser 2021-10-15 14:05:39 +02:00
parent 1a8d539c9e
commit bfef13824e

View file

@ -64,19 +64,20 @@ export function getMessageURL(buf, msg) {
}
export function getServerName(server, bouncerNetwork, isBouncer) {
if (bouncerNetwork && bouncerNetwork.name) {
return bouncerNetwork.name;
let netName = server.isupport.get("NETWORK");
if (bouncerNetwork) {
if (bouncerNetwork.name && bouncerNetwork.name !== bouncerNetwork.host) {
// User has picked a custom name for the network, use that
return bouncerNetwork.name;
}
return netName || bouncerNetwork.name || "server";
}
if (isBouncer) {
return "bouncer";
}
let netName = server.isupport.get("NETWORK");
if (netName) {
return netName;
}
return "server";
return netName || "server";
}
function updateState(state, updater) {