From 68dc5c8b3cda1d7e763f870a0fa089158978d707 Mon Sep 17 00:00:00 2001 From: stonedDiscord Date: Fri, 16 Jan 2026 21:33:01 +0100 Subject: [PATCH 1/3] block spectators from using judge controls --- src/packet/packet_hp.cpp | 10 ++++++++++ src/packet/packet_rt.cpp | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/src/packet/packet_hp.cpp b/src/packet/packet_hp.cpp index 0e50e98c..cc56dc9c 100644 --- a/src/packet/packet_hp.cpp +++ b/src/packet/packet_hp.cpp @@ -21,6 +21,16 @@ PacketInfo PacketHP::getPacketInfo() const void PacketHP::handlePacket(AreaData *area, AOClient &client) const { + if (client.m_is_spectator) { + client.sendServerMessage("Spectators are blocked from using the judge controls."); + return; + } + + if (area->lockStatus() == AreaData::LockStatus::SPECTATABLE && !area->invited().contains(client.clientId()) && !client.checkPermission(ACLRole::BYPASS_LOCKS)) { + client.sendServerMessage("Spectators are blocked from using the judge controls."); + return; + } + if (client.m_is_wtce_blocked) { client.sendServerMessage("You are blocked from using the judge controls."); return; diff --git a/src/packet/packet_rt.cpp b/src/packet/packet_rt.cpp index 98eb5dab..c9947944 100644 --- a/src/packet/packet_rt.cpp +++ b/src/packet/packet_rt.cpp @@ -20,6 +20,16 @@ PacketInfo PacketRT::getPacketInfo() const void PacketRT::handlePacket(AreaData *area, AOClient &client) const { + if (client.m_is_spectator) { + client.sendServerMessage("Spectators are blocked from using the judge controls."); + return; + } + + if (area->lockStatus() == AreaData::LockStatus::SPECTATABLE && !area->invited().contains(client.clientId()) && !client.checkPermission(ACLRole::BYPASS_LOCKS)) { + client.sendServerMessage("Spectators are blocked from using the judge controls."); + return; + } + if (client.m_is_wtce_blocked) { client.sendServerMessage("You are blocked from using the judge controls."); return; From 784eb1ded21f17c4e329d0b633042db80fe1bbc5 Mon Sep 17 00:00:00 2001 From: stonedDiscord Date: Sun, 18 Jan 2026 11:33:02 +0100 Subject: [PATCH 2/3] stray tab --- src/packet/packet_hp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/packet/packet_hp.cpp b/src/packet/packet_hp.cpp index cc56dc9c..396baba1 100644 --- a/src/packet/packet_hp.cpp +++ b/src/packet/packet_hp.cpp @@ -30,7 +30,7 @@ void PacketHP::handlePacket(AreaData *area, AOClient &client) const client.sendServerMessage("Spectators are blocked from using the judge controls."); return; } - + if (client.m_is_wtce_blocked) { client.sendServerMessage("You are blocked from using the judge controls."); return; From 0ebf99954d572783515c5ef7c7d6f04e9171f3e9 Mon Sep 17 00:00:00 2001 From: stonedDiscord Date: Sun, 18 Jan 2026 11:36:53 +0100 Subject: [PATCH 3/3] another one --- src/packet/packet_rt.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/packet/packet_rt.cpp b/src/packet/packet_rt.cpp index c9947944..77b367ee 100644 --- a/src/packet/packet_rt.cpp +++ b/src/packet/packet_rt.cpp @@ -29,7 +29,7 @@ void PacketRT::handlePacket(AreaData *area, AOClient &client) const client.sendServerMessage("Spectators are blocked from using the judge controls."); return; } - + if (client.m_is_wtce_blocked) { client.sendServerMessage("You are blocked from using the judge controls."); return;