mirror of
https://github.com/daffyyyy/CS2-SimpleAdmin.git
synced 2026-02-18 10:43:23 +00:00
1.2.8a
- 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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user