mirror of
https://github.com/daffyyyy/CS2-SimpleAdmin.git
synced 2026-10-18 04:47:04 +02:00
1.3.6a
- Minor changes - Added `css_gravity` command - Added `css_money` command - Changed Utc time to LocalTime - Updated translations (ChatGPT generated) - Updated css version
This commit is contained in:
parent
da6fb2fc22
commit
2ab2f9c4dc
27 changed files with 731 additions and 489 deletions
|
|
@ -17,8 +17,8 @@ internal class MuteManager
|
|||
|
||||
await using var connection = await _database.GetConnectionAsync();
|
||||
|
||||
DateTime now = DateTime.UtcNow;
|
||||
DateTime futureTime = now.AddMinutes(time);
|
||||
DateTime now = DateTime.UtcNow.ToLocalTime();
|
||||
DateTime futureTime = now.AddMinutes(time).ToLocalTime();
|
||||
|
||||
string muteType = "GAG";
|
||||
if (type == 1)
|
||||
|
|
@ -50,8 +50,8 @@ internal class MuteManager
|
|||
|
||||
await using var connection = await _database.GetConnectionAsync();
|
||||
|
||||
DateTime now = DateTime.UtcNow;
|
||||
DateTime futureTime = now.AddMinutes(time);
|
||||
DateTime now = DateTime.UtcNow.ToLocalTime();
|
||||
DateTime futureTime = now.AddMinutes(time).ToLocalTime();
|
||||
|
||||
string muteType = "GAG";
|
||||
if (type == 1)
|
||||
|
|
@ -84,14 +84,14 @@ internal class MuteManager
|
|||
}
|
||||
|
||||
#if DEBUG
|
||||
if (CS2_SimpleAdmin._logger != null)
|
||||
if (CS2_SimpleAdmin._logger!= null)
|
||||
CS2_SimpleAdmin._logger.LogCritical($"IsPlayerMuted for {steamId}");
|
||||
#endif
|
||||
|
||||
try
|
||||
{
|
||||
await using var connection = await _database.GetConnectionAsync();
|
||||
DateTime currentTime = DateTime.Now;
|
||||
DateTime currentTime = DateTime.Now.ToLocalTime();
|
||||
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 = currentTime };
|
||||
|
|
@ -152,7 +152,7 @@ internal class MuteManager
|
|||
await using var connection = await _database.GetConnectionAsync();
|
||||
|
||||
string sql = "UPDATE sa_mutes SET status = 'EXPIRED' WHERE status = 'ACTIVE' AND `duration` > 0 AND ends <= @CurrentTime";
|
||||
await connection.ExecuteAsync(sql, new { CurrentTime = DateTime.Now });
|
||||
await connection.ExecuteAsync(sql, new { CurrentTime = DateTime.Now.ToLocalTime() });
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue