diff --git a/mod/Jailbreak.Teams/Queue/QueueBehavior.cs b/mod/Jailbreak.Teams/Queue/QueueBehavior.cs index cb73958f..dbf2f722 100644 --- a/mod/Jailbreak.Teams/Queue/QueueBehavior.cs +++ b/mod/Jailbreak.Teams/Queue/QueueBehavior.cs @@ -147,6 +147,9 @@ public HookResult OnRequestToJoinTeam(CCSPlayerController? invoked, CommandInfo if (!int.TryParse(command.ArgByIndex(1), out int team)) return HookResult.Stop; + if (Utilities.GetPlayers().Find(c => c.GetTeam() == CsTeam.CounterTerrorist) == null) + return HookResult.Continue; // If no CTs, let anyone on CT team + // Player is attempting to join CT and is not a guard? // If so, stop them!! if ((CsTeam)team == CsTeam.CounterTerrorist && !state.IsGuard) diff --git a/mod/Jailbreak.Warden/Commands/WardenCommandsBehavior.cs b/mod/Jailbreak.Warden/Commands/WardenCommandsBehavior.cs index 032d95d8..4d82827c 100644 --- a/mod/Jailbreak.Warden/Commands/WardenCommandsBehavior.cs +++ b/mod/Jailbreak.Warden/Commands/WardenCommandsBehavior.cs @@ -63,11 +63,13 @@ public void Command_Warden(CCSPlayerController? player, CommandInfo command) // Is a CT and queue is open if (isCt && _queue.Active) { - if (_queue.InQueue(player)) + if (!_queue.InQueue(player)) { if (_queue.TryEnter(player)) _notifications.JOIN_RAFFLE.ToPlayerChat(player); + return; + } - if (!_queue.InQueue(player)) + if (_queue.InQueue(player)) if (_queue.TryExit(player)) _notifications.LEAVE_RAFFLE.ToPlayerChat(player);