mirror of
https://codeberg.org/emersion/gamja.git
synced 2024-11-14 19:05:01 -05:00
Use ISUPPORT NETWORK if user hasn't specified custom name
This commit is contained in:
parent
1a8d539c9e
commit
bfef13824e
1 changed files with 9 additions and 8 deletions
17
state.js
17
state.js
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue