Whitelist reason cvar + RP server whitelist reason (#10451)
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -813,6 +813,12 @@ namespace Content.Shared.CCVar
|
||||
public static readonly CVarDef<bool> WhitelistEnabled =
|
||||
CVarDef.Create("whitelist.enabled", false, CVar.SERVERONLY);
|
||||
|
||||
/// <summary>
|
||||
/// The loc string to display as a disconnect reason when someone is not whitelisted.
|
||||
/// </summary>
|
||||
public static readonly CVarDef<string> WhitelistReason =
|
||||
CVarDef.Create("whitelist.reason", "whitelist-not-whitelisted", CVar.SERVERONLY);
|
||||
|
||||
/*
|
||||
* VOTE
|
||||
*/
|
||||
|
||||
@@ -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 <username>
|
||||
|
||||
Reference in New Issue
Block a user