From 8a26920e4c790cf7629cb3a88971a3dadfdc20d9 Mon Sep 17 00:00:00 2001 From: Pieter-Jan Briers Date: Fri, 9 Apr 2021 19:28:03 +0200 Subject: [PATCH] Disable HWID bans currently. --- Content.Server/ConnectionManager.cs | 3 ++- Content.Shared/CCVars.cs | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Content.Server/ConnectionManager.cs b/Content.Server/ConnectionManager.cs index eea230262f..56b4026018 100644 --- a/Content.Server/ConnectionManager.cs +++ b/Content.Server/ConnectionManager.cs @@ -63,9 +63,10 @@ The ban reason is: ""{ban.Reason}"" var addr = e.IP.Address; var userId = e.UserId; ImmutableArray? 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; } diff --git a/Content.Shared/CCVars.cs b/Content.Shared/CCVars.cs index 9576ce92da..ee83abb214 100644 --- a/Content.Shared/CCVars.cs +++ b/Content.Shared/CCVars.cs @@ -305,5 +305,11 @@ namespace Content.Shared public static readonly CVarDef VoteRestartRequiredRatio = CVarDef.Create("vote.restart_required_ratio", 0.8f, CVar.SERVERONLY); + /* + * BAN + */ + + public static readonly CVarDef BanHardwareIds = + CVarDef.Create("ban.hardware_ids", false, CVar.SERVERONLY); } }