BabyJail = 4,
/// Results from rejected connections with external API checking tools
IPChecks = 5,
+ /// Results from rejected connections who are authenticated but have no modern hwid associated with them.
+ NoHwid = 6
}
public class ServerBanHit
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)
{
public static readonly CVarDef<bool> BanHardwareIds =
CVarDef.Create("ban.hardware_ids", true, CVar.SERVERONLY);
+ /// <summary>
+ /// Determines if we'll reject connections from clients who don't have a modern hwid.
+ /// </summary>
+ public static readonly CVarDef<bool> RequireModernHardwareId =
+ CVarDef.Create("admin.require_modern_hwid", true, CVar.SERVERONLY);
+
/// <summary>
/// If true, players are allowed to connect to multiple game servers at once.
/// If false, they will be kicked from the first when connecting to another.
ipintel-server-ratelimited = This server uses a security system with external verification, which has reached its maximum verification limit. Please contact the administration team of the server for assistance and try again later.
ipintel-unknown = This server uses a security system with external verification, but it encountered an error. Please contact the administration team of the server for assistance and try again later.
ipintel-suspicious = You seem to be connecting through a datacenter or VPN. For administrative reasons we do not allow VPN connections to play. Please contact the administration team of the server for assistance if you believe this is false.
+
+hwid-required = Your client has refused to send a hardware id. Please contact the administration team for further assistance.