add bypass locks permission

This commit is contained in:
in1tiate 2021-05-05 09:32:16 -05:00
parent 7a1a41932a
commit 5193e11401
3 changed files with 3 additions and 2 deletions

View File

@ -229,6 +229,7 @@ class AOClient : public QObject {
{"UNCM", 1ULL << 11},
{"SAVETEST", 1ULL << 12},
{"FORCE_CHARSELECT",1ULL << 13},
{"BYPASS_LOCKS", 1ULL << 14},
{"SUPER", ~0ULL }
};

View File

@ -109,7 +109,7 @@ void AOClient::changeArea(int new_area)
sendServerMessage("You are already in area " + server->area_names[current_area]);
return;
}
if (server->areas[new_area]->locked == AreaData::LockStatus::LOCKED && !server->areas[new_area]->invited.contains(id)) {
if (server->areas[new_area]->locked == AreaData::LockStatus::LOCKED && !server->areas[new_area]->invited.contains(id) && !checkAuth(ACLFlags.value("BYPASS_LOCKS"))) {
sendServerMessage("Area " + server->area_names[new_area] + " is locked.");
return;
}

View File

@ -486,7 +486,7 @@ AOPacket AOClient::validateIcPacket(AOPacket packet)
// Spectators cannot use IC
return invalid;
AreaData* area = server->areas[current_area];
if (area->locked == AreaData::LockStatus::SPECTATABLE && !area->invited.contains(id))
if (area->locked == AreaData::LockStatus::SPECTATABLE && !area->invited.contains(id) && !checkAuth(ACLFlags.value("BYPASS_LOCKS")))
// Non-invited players cannot speak in spectatable areas
return invalid;