Merge upstream to 1.6.9a

This commit is contained in:
Sachin 2024-11-24 12:59:54 +05:30
commit a84ebee1db
17 changed files with 188 additions and 45 deletions

View file

@ -86,6 +86,11 @@ public class PlayerManager
try
{
if (!CS2_SimpleAdmin.PlayersInfo.ContainsKey(userId))
{
Helper.KickPlayer(userId, NetworkDisconnectionReason.NETWORK_DISCONNECT_REJECT_INVALIDCONNECTION);
}
// Check if the player is banned
var isBanned = await CS2_SimpleAdmin.Instance.BanManager.IsPlayerBanned(CS2_SimpleAdmin.PlayersInfo[userId]);
@ -196,7 +201,7 @@ public class PlayerManager
}
catch (Exception ex)
{
CS2_SimpleAdmin._logger?.LogError($"Error processing player connection: {ex}");
CS2_SimpleAdmin._logger?.LogError("Error processing player connection: {exception}", ex.Message);
}
});
@ -265,7 +270,7 @@ public class PlayerManager
}
catch (Exception ex)
{
CS2_SimpleAdmin._logger?.LogError($"Unexpected error: {ex.Message}");
CS2_SimpleAdmin._logger?.LogError("Unexpected error: {exception}", ex.Message);
}
CS2_SimpleAdmin.BannedPlayers.Clear();