Require hwid (#35331)

* Make cvar to require that the client has a modern hwid

* Ignore guests and don't disable cvar on dev

* Rename and add docs
This commit is contained in:
nikthechampiongr
2025-02-20 10:04:45 -08:00
committed by GitHub
parent 93021c4879
commit 09f75394be
4 changed files with 15 additions and 0 deletions

View File

@@ -220,6 +220,11 @@ namespace Content.Server.Connection
var modernHwid = e.UserData.ModernHWIds;
if (modernHwid.Length == 0 && e.AuthType == LoginType.LoggedIn && _cfg.GetCVar(CCVars.RequireModernHardwareId))
{
return (ConnectionDenyReason.NoHwid, Loc.GetString("hwid-required"), null);
}
var bans = await _db.GetServerBansAsync(addr, userId, hwId, modernHwid, includeUnbanned: false);
if (bans.Count > 0)
{