Ban message improvements (#14731)
Server config now provide appeals forum link, game admins won't need to type it out manually anymore. Add warning about trying to ban evade. Cleaned up code a bit.
This commit is contained in:
committed by
GitHub
parent
eed3c2a509
commit
3af2e60817
@@ -28,6 +28,7 @@ namespace Content.Server.Connection
|
||||
[Dependency] private readonly IServerNetManager _netMgr = default!;
|
||||
[Dependency] private readonly IServerDbManager _db = default!;
|
||||
[Dependency] private readonly IConfigurationManager _cfg = default!;
|
||||
[Dependency] private readonly ILocalizationManager _loc = default!;
|
||||
|
||||
public void Initialize()
|
||||
{
|
||||
@@ -147,7 +148,8 @@ namespace Content.Server.Connection
|
||||
if (bans.Count > 0)
|
||||
{
|
||||
var firstBan = bans[0];
|
||||
return (ConnectionDenyReason.Ban, firstBan.DisconnectMessage, bans);
|
||||
var message = firstBan.FormatBanMessage(_cfg, _loc);
|
||||
return (ConnectionDenyReason.Ban, message, bans);
|
||||
}
|
||||
|
||||
if (_cfg.GetCVar(CCVars.WhitelistEnabled))
|
||||
|
||||
Reference in New Issue
Block a user