Skip to content

Commit

Permalink
Fixed gag
Browse files Browse the repository at this point in the history
  • Loading branch information
daffyyyy committed Sep 28, 2024
1 parent b1ab6e0 commit 702a031
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
8 changes: 4 additions & 4 deletions CS2-SimpleAdmin/Events.cs
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,10 @@ private HookResult OnCommandSayNew(CCSPlayerController? player, CommandInfo info
return HookResult.Continue;

if (info.GetArg(1).Length == 0)
return HookResult.Handled;

return HookResult.Stop;
if (PlayerPenaltyManager.IsPenalized(player.Slot, PenaltyType.Gag) || PlayerPenaltyManager.IsPenalized(player.Slot, PenaltyType.Silence))
return HookResult.Handled;
return HookResult.Stop;

if (command != "say_team" || !info.GetArg(1).StartsWith($"@")) return HookResult.Continue;

Expand All @@ -178,7 +178,7 @@ private HookResult OnCommandSayNew(CCSPlayerController? player, CommandInfo info
}
}

return HookResult.Handled;
return HookResult.Stop;
}

/*public HookResult OnCommandSay(CCSPlayerController? player, CommandInfo info)
Expand Down
1 change: 0 additions & 1 deletion CS2-SimpleAdmin/Helper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,6 @@ public static DateTime ActualDateTime()
{
TimeZoneInfo timezone = TimeZoneInfo.FindSystemTimeZoneById(timezoneId);
DateTime userTime = TimeZoneInfo.ConvertTimeFromUtc(utcNow, timezone);

return userTime;
}
catch (TimeZoneNotFoundException)
Expand Down

0 comments on commit 702a031

Please sign in to comment.