From 6244beff7143f9580b264aabed93d2204fa46819 Mon Sep 17 00:00:00 2001 From: jenz Date: Sat, 15 Apr 2023 23:51:59 +0200 Subject: [PATCH] replaced kickclient with just having the client auto retry when steamID is pending --- .../scripting/PlayerManager_Connect.sp | 26 +++++++++++-------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/PlayerManager/scripting/PlayerManager_Connect.sp b/PlayerManager/scripting/PlayerManager_Connect.sp index a650a384..b8b419a8 100644 --- a/PlayerManager/scripting/PlayerManager_Connect.sp +++ b/PlayerManager/scripting/PlayerManager_Connect.sp @@ -328,17 +328,21 @@ public void OnClientPostAdminCheck(int client) //---------------------------------------------------------------------------------------------------- public Action CheckAuth(Handle timer, int data) { - int client; - if ((client = GetClientFromSerial(data)) == 0) - return Plugin_Stop; + int client; + if ((client = GetClientFromSerial(data)) == 0) + return Plugin_Stop; - char sAuthID[32]; - if(!GetClientAuthId(client, AuthId_Steam2, sAuthID, sizeof(sAuthID), true)) - { - LogMessage("%L could not be assigned to a SteamID, kicking client.", client); - KickClient(client, "Invalid STEAMID"); - } - return Plugin_Stop; + char sAuthID[32]; + if(!GetClientAuthId(client, AuthId_Steam2, sAuthID, sizeof(sAuthID), true)) + { + LogMessage("%L could not be assigned to a SteamID, kicking client.", client); + //KickClient(client, "Invalid STEAMID"); + if (IsClientConnected(client) && !IsFakeClient(client) && !IsClientSourceTV(client)) + { + ClientCommand(client, "retry"); + } + } + return Plugin_Stop; } //---------------------------------------------------------------------------------------------------- @@ -507,4 +511,4 @@ public int Native_GetPlayerGUID(Handle hPlugin, int numParams) } return !SetNativeString(2, g_cPlayerGUID[client], length + 1); -} \ No newline at end of file +}