- Fixed godmode
- Added logging commands to simpleadmin logs file
- Fixed votes?
- Added updating player_ip and player_name after connect with ban issued by css_addban
This commit is contained in:
Dawid Bepierszcz
2024-02-21 13:14:46 +01:00
parent 619bdfbb14
commit 5bf966f9cd
16 changed files with 213 additions and 88 deletions

View File

@@ -93,10 +93,10 @@ namespace CS2_SimpleAdmin
try
{
await using var connection = await _database.GetConnectionAsync();
DateTime currentTimeUtc = DateTime.UtcNow;
DateTime currentTime = DateTime.Now;
string sql = "SELECT * FROM sa_mutes WHERE player_steamid = @PlayerSteamID AND status = 'ACTIVE' AND (duration = 0 OR ends > @CurrentTime)";
var parameters = new { PlayerSteamID = steamId, CurrentTime = currentTimeUtc };
var parameters = new { PlayerSteamID = steamId, CurrentTime = currentTime };
var activeMutes = (await connection.QueryAsync(sql, parameters)).ToList();
return activeMutes;
}