mirror of
https://github.com/daffyyyy/CS2-SimpleAdmin.git
synced 2026-02-18 10:43:23 +00:00
1.6.1b
- Fixed rare problem when system uses other timezone than plugin - Fixed time type in discord webhook
This commit is contained in:
@@ -364,12 +364,12 @@ internal static class Helper
|
||||
var targetName = target != null ? target.PlayerName : localizer["sa_unknown"];
|
||||
var targetSteamId = target != null ? new SteamID(target.SteamID).SteamId64.ToString() : localizer["sa_unknown"];
|
||||
|
||||
var futureTime = DateTime.Now.AddMinutes(duration);
|
||||
var futureTime = Time.ActualDateTime().AddMinutes(duration);
|
||||
var futureUnixTimestamp = new DateTimeOffset(futureTime).ToUnixTimeSeconds();
|
||||
|
||||
string time;
|
||||
|
||||
if (penaltySetting.FirstOrDefault(s => s.Name.Equals("Webhook"))?.Value == "{relative}")
|
||||
if (penaltySetting.FirstOrDefault(s => s.Name.Equals("Time"))?.Value == "{relative}")
|
||||
time = duration != 0 ? $"<t:{futureUnixTimestamp}:R>" : localizer["sa_permanent"];
|
||||
else
|
||||
time = duration != 0 ? ConvertMinutesToTime(duration) : localizer["sa_permanent"];
|
||||
|
||||
Reference in New Issue
Block a user