From 1e969e697f57fdae220789e99e50809fa78f4e32 Mon Sep 17 00:00:00 2001 From: jenz Date: Mon, 5 Oct 2026 10:03:42 +0200 Subject: [PATCH] should now exclude the webclient from vpn checking as its an internal docker IP that cant be resolved obviously --- VPN-Check/scripting/VPN-Check.sp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/VPN-Check/scripting/VPN-Check.sp b/VPN-Check/scripting/VPN-Check.sp index 9318a5f..3d43ad4 100644 --- a/VPN-Check/scripting/VPN-Check.sp +++ b/VPN-Check/scripting/VPN-Check.sp @@ -102,9 +102,19 @@ public void OnClientAuthorized(int client, const char[] auth) char sIP[32]; 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]; Format(sQuery, sizeof(sQuery), "SELECT * FROM ip_table WHERE ip='%s'", sIP); - g_hDatabase.Query(SQL_OnQueryCompleted, sQuery, GetClientSerial(client), DBPrio_Low); }