mirror of
https://github.com/daffyyyy/CS2-SimpleAdmin.git
synced 2026-09-27 20:17:04 +02:00
1.6.9a
- Added `IsAdminSilent` to api - Fixed disabling noclip via admin menu - Fixed (?) hibernation problem - Added discord webhook fire when adding ban or mute for offline player - Updated css and mysqlconnector
This commit is contained in:
parent
70a62d4b63
commit
b2ebe136c3
17 changed files with 175 additions and 41 deletions
|
|
@ -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]);
|
||||
|
||||
|
|
@ -194,7 +199,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);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
@ -263,7 +268,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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue