Make ban command properly give a ban message instead of a placeholder (#5087)
This commit is contained in:
@@ -52,5 +52,19 @@ namespace Content.Server.Database
|
||||
BanningAdmin = banningAdmin;
|
||||
Unban = unban;
|
||||
}
|
||||
|
||||
public string DisconnectMessage
|
||||
{
|
||||
get {
|
||||
var expires = "This is a permanent ban.";
|
||||
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.";
|
||||
}
|
||||
return $"You, or another user of this computer or connection, are banned from playing here.\nThe ban reason is: \"{this.Reason}\"\n{expires}";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user