diff --git a/Content.Server/Connection/ConnectionManager.cs b/Content.Server/Connection/ConnectionManager.cs index 8ae9f1f673..5663015fe2 100644 --- a/Content.Server/Connection/ConnectionManager.cs +++ b/Content.Server/Connection/ConnectionManager.cs @@ -131,7 +131,7 @@ The ban reason is: ""{ban.Reason}"" && await _db.GetWhitelistStatusAsync(userId) == false && adminData is null) { - return (ConnectionDenyReason.Whitelist, Loc.GetString("whitelist-not-whitelisted"), null); + return (ConnectionDenyReason.Whitelist, Loc.GetString(_cfg.GetCVar(CCVars.WhitelistReason)), null); } return null; diff --git a/Content.Shared/CCVar/CCVars.cs b/Content.Shared/CCVar/CCVars.cs index 7a24703993..dec6563391 100644 --- a/Content.Shared/CCVar/CCVars.cs +++ b/Content.Shared/CCVar/CCVars.cs @@ -813,6 +813,12 @@ namespace Content.Shared.CCVar public static readonly CVarDef WhitelistEnabled = CVarDef.Create("whitelist.enabled", false, CVar.SERVERONLY); + /// + /// The loc string to display as a disconnect reason when someone is not whitelisted. + /// + public static readonly CVarDef WhitelistReason = + CVarDef.Create("whitelist.reason", "whitelist-not-whitelisted", CVar.SERVERONLY); + /* * VOTE */ diff --git a/Resources/Locale/en-US/connection-messages.ftl b/Resources/Locale/en-US/connection-messages.ftl index 411b1d743e..a17b202718 100644 --- a/Resources/Locale/en-US/connection-messages.ftl +++ b/Resources/Locale/en-US/connection-messages.ftl @@ -1,4 +1,5 @@ whitelist-not-whitelisted = You are not whitelisted. +whitelist-not-whitelisted-rp = You are not whitelisted. To become whitelisted, visit our Discord (which can be found at https://spacestation14.io) and check the #rp-whitelist channel. command-whitelistadd-description = Adds the player with the given username to the server whitelist. command-whitelistadd-help = whitelistadd