- Updated minimum CounterStrikeSharp version to **154**
- Fixed? issue with checking ban status for player with authorization problem
- Added additional checks for immunity
- Added new config variable `BanType` if `1` = `SteamID + IP`, if `0` = `SteamID`
This commit is contained in:
Dawid Bepierszcz
2024-01-24 23:50:49 +01:00
parent b5600d7e73
commit 855f087a7b
5 changed files with 524 additions and 307 deletions

View File

@@ -23,11 +23,12 @@ namespace CS2_SimpleAdmin
var sql = "INSERT INTO `sa_bans` (`player_steamid`, `player_name`, `player_ip`, `admin_steamid`, `admin_name`, `reason`, `duration`, `ends`, `created`, `server_id`) " +
"VALUES (@playerSteamid, @playerName, @playerIp, @adminSteamid, @adminName, @banReason, @duration, @ends, @created, @serverid)";
CS2_SimpleAdminConfig config = new CS2_SimpleAdminConfig();
await connection.ExecuteAsync(sql, new
{
playerSteamid = player.SteamId,
playerName = player.Name,
playerIp = player.IpAddress,
playerIp = config.BanType == 1 ? player.IpAddress : null,
adminSteamid = issuer.SteamId == null ? "Console" : issuer.SteamId,
adminName = issuer.Name == null ? "Console" : issuer.Name,
banReason = reason,