From c008c39a869db20c5a5a1f69cf0a7a9bba40d340 Mon Sep 17 00:00:00 2001 From: dogan Date: Tue, 21 Jul 2020 14:39:29 +0200 Subject: [PATCH] FakeClients: handle insta reconnect block differently --- FakeClients/scripting/FakeClients.sp | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/FakeClients/scripting/FakeClients.sp b/FakeClients/scripting/FakeClients.sp index 38e00494..f9fbc5e9 100644 --- a/FakeClients/scripting/FakeClients.sp +++ b/FakeClients/scripting/FakeClients.sp @@ -18,7 +18,6 @@ int g_iAdminFakes; bool g_bCheckRequested; -int g_iBlockInstantFakeConnects; bool g_bBlockInstantFakeConnects; //---------------------------------------------------------------------------------------------------- @@ -48,7 +47,6 @@ public void OnPluginStart() g_iAdminFakes = -1; g_bMapEnded = false; g_bBlockInstantFakeConnects = false; - g_iBlockInstantFakeConnects = 0; CreateTimer(5.0, BlockInstantFakeConnects, _, TIMER_REPEAT); CreateTimer(3.0, RandomizePing, _, TIMER_REPEAT); CreateTimer(150.0, RandomizeNames, _, TIMER_REPEAT); @@ -106,8 +104,6 @@ public void OnMapStart() g_bMapEnded = false; g_bBlockInstantFakeConnects = false; - g_iBlockInstantFakeConnects = 0; - CreateTimer(5.0, BlockInstantFakeConnects, _, TIMER_REPEAT); } //---------------------------------------------------------------------------------------------------- @@ -124,13 +120,9 @@ public void OnMapEnd() //---------------------------------------------------------------------------------------------------- public Action BlockInstantFakeConnects(Handle timer) { - g_iBlockInstantFakeConnects++; g_bBlockInstantFakeConnects = false; RequestFrame(CheckPopulation); - if(g_iBlockInstantFakeConnects > 5) - return Plugin_Stop; - return Plugin_Continue; } @@ -229,12 +221,6 @@ public Action Command_DebugFakes(int client, int argc) //---------------------------------------------------------------------------------------------------- public Action Command_SetFakes(int client, int argc) { - if(g_iBlockInstantFakeConnects <= 6) - { - ReplyToCommand(client, "[SM] Not available right now, because the Plugin is still loading. Try again in couple seconds."); - return Plugin_Handled; - } - if (argc < 1) { ReplyToCommand(client, "[SM] Usage: sm_setfakes "); @@ -434,7 +420,7 @@ public void CheckPopulation() //CS_SetClientClanTag(iIndex, "UNLOZE"); iFakes++; - if(g_iBlockInstantFakeConnects <= 6 && g_iAdminFakes == -1) + if(g_iAdminFakes == -1) g_bBlockInstantFakeConnects = true; }