From dea3d6b19bbc0187194968c29b057e0b23aadb2c Mon Sep 17 00:00:00 2001 From: jenz Date: Mon, 24 Apr 2023 22:33:16 +0200 Subject: [PATCH] hopefully stopped anti spoofing from eating a lot of connections --- PlayerManager/scripting/PlayerManager_Connect.sp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/PlayerManager/scripting/PlayerManager_Connect.sp b/PlayerManager/scripting/PlayerManager_Connect.sp index f9bb413c..2fd8ac84 100644 --- a/PlayerManager/scripting/PlayerManager_Connect.sp +++ b/PlayerManager/scripting/PlayerManager_Connect.sp @@ -70,10 +70,12 @@ public void OnPluginStart() //---------------------------------------------------------------------------------------------------- public void OnConfigsExecuted() { - if(!g_hCvar_BlockSpoof.BoolValue) - return; - - Database.Connect(SQL_OnDatabaseConnect, "PlayerManager"); + if(!g_hCvar_BlockSpoof.BoolValue) + return; + if (!g_hDatabase) + { + Database.Connect(SQL_OnDatabaseConnect, "PlayerManager"); + } } //----------------------------------------------------------------------------------------------------