should now exclude the webclient from vpn checking as its an internal docker IP that cant be resolved obviously

This commit is contained in:
jenz
2026-10-05 10:03:42 +02:00
parent eb19a779a6
commit 1e969e697f
+11 -1
View File
@@ -102,9 +102,19 @@ public void OnClientAuthorized(int client, const char[] auth)
char sIP[32]; char sIP[32];
GetClientIP(client, sIP, sizeof(sIP)); GetClientIP(client, sIP, sizeof(sIP));
char allowed_ips[128];
ConVar sv_set_steam_id_ips = FindConVar("sv_set_steam_id_ips");
if (sv_set_steam_id_ips != null)
{
sv_set_steam_id_ips.GetString(allowed_ips, sizeof(allowed_ips));
if (StrEqual(sIP, allowed_ips))
{
return; //its the webclient, the internal docker IP obviously cannot be found by VPN checker.
}
}
char sQuery[512]; char sQuery[512];
Format(sQuery, sizeof(sQuery), "SELECT * FROM ip_table WHERE ip='%s'", sIP); Format(sQuery, sizeof(sQuery), "SELECT * FROM ip_table WHERE ip='%s'", sIP);
g_hDatabase.Query(SQL_OnQueryCompleted, sQuery, GetClientSerial(client), DBPrio_Low); g_hDatabase.Query(SQL_OnQueryCompleted, sQuery, GetClientSerial(client), DBPrio_Low);
} }