9386 Permanent ban message change (#11325)

This commit is contained in:
Dylan Corrales
2022-09-15 15:33:11 -04:00
committed by GitHub
parent 165970b58b
commit 4ea7087d6f
3 changed files with 12 additions and 8 deletions

View File

@@ -55,14 +55,15 @@ namespace Content.Server.Database
public string DisconnectMessage
{
get {
var expires = "This is a permanent ban.";
var expires = Loc.GetString("ban-banned-permanent");
if (this.ExpirationTime is { } expireTime)
{
var duration = expireTime - this.BanTime;
var utc = expireTime.ToUniversalTime();
expires = $"This ban is for {duration.TotalMinutes:N0} minutes and will expire at {utc:f} UTC.";
expires = Loc.GetString("ban-expires", ("duration", duration.TotalMinutes.ToString("N0")), ("time", utc.ToString("f")));
}
return $"You, or another user of this computer or connection, are banned from playing here.\nThe ban reason is: \"{this.Reason}\"\n{expires}";
var details = Loc.GetString("ban-banned-1") + "\n" + Loc.GetString("ban-banned-2", ("reason", this.Reason)) + "\n" + expires;
return details;
}
}
}