Disable HWID bans currently.

This commit is contained in:
Pieter-Jan Briers
2021-04-09 19:28:03 +02:00
parent 0827a95bee
commit 8a26920e4c
2 changed files with 8 additions and 1 deletions

View File

@@ -63,9 +63,10 @@ The ban reason is: ""{ban.Reason}""
var addr = e.IP.Address;
var userId = e.UserId;
ImmutableArray<byte>? hwId = e.UserData.HWId;
if (hwId.Value.Length == 0)
if (hwId.Value.Length == 0 || !_cfg.GetCVar(CCVars.BanHardwareIds))
{
// HWId not available for user's platform, don't look it up.
// Or hardware ID checks disabled.
hwId = null;
}

View File

@@ -305,5 +305,11 @@ namespace Content.Shared
public static readonly CVarDef<float> VoteRestartRequiredRatio =
CVarDef.Create("vote.restart_required_ratio", 0.8f, CVar.SERVERONLY);
/*
* BAN
*/
public static readonly CVarDef<bool> BanHardwareIds =
CVarDef.Create("ban.hardware_ids", false, CVar.SERVERONLY);
}
}