Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/packet/packet_hp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
10 changes: 10 additions & 0 deletions src/packet/packet_rt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down