File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed
Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,16 @@ PacketInfo PacketHP::getPacketInfo() const
2121
2222void PacketHP::handlePacket (AreaData *area, AOClient &client) const
2323{
24+ if (client.m_is_spectator ) {
25+ client.sendServerMessage (" Spectators are blocked from using the judge controls." );
26+ return ;
27+ }
28+
29+ if (area->lockStatus () == AreaData::LockStatus::SPECTATABLE && !area->invited ().contains (client.clientId ()) && !client.checkPermission (ACLRole::BYPASS_LOCKS)) {
30+ client.sendServerMessage (" Spectators are blocked from using the judge controls." );
31+ return ;
32+ }
33+
2434 if (client.m_is_wtce_blocked ) {
2535 client.sendServerMessage (" You are blocked from using the judge controls." );
2636 return ;
Original file line number Diff line number Diff line change @@ -20,6 +20,16 @@ PacketInfo PacketRT::getPacketInfo() const
2020
2121void PacketRT::handlePacket (AreaData *area, AOClient &client) const
2222{
23+ if (client.m_is_spectator ) {
24+ client.sendServerMessage (" Spectators are blocked from using the judge controls." );
25+ return ;
26+ }
27+
28+ if (area->lockStatus () == AreaData::LockStatus::SPECTATABLE && !area->invited ().contains (client.clientId ()) && !client.checkPermission (ACLRole::BYPASS_LOCKS)) {
29+ client.sendServerMessage (" Spectators are blocked from using the judge controls." );
30+ return ;
31+ }
32+
2333 if (client.m_is_wtce_blocked ) {
2434 client.sendServerMessage (" You are blocked from using the judge controls." );
2535 return ;
You can’t perform that action at this time.
0 commit comments