Merge pull request #121 from AttorneyOnline/bypass-locks
Allow users with the BYPASS_LOCKS permission to... bypass locks.
This commit is contained in:
commit
90ef45c681
@ -229,6 +229,7 @@ class AOClient : public QObject {
|
|||||||
{"UNCM", 1ULL << 11},
|
{"UNCM", 1ULL << 11},
|
||||||
{"SAVETEST", 1ULL << 12},
|
{"SAVETEST", 1ULL << 12},
|
||||||
{"FORCE_CHARSELECT",1ULL << 13},
|
{"FORCE_CHARSELECT",1ULL << 13},
|
||||||
|
{"BYPASS_LOCKS", 1ULL << 14},
|
||||||
{"SUPER", ~0ULL }
|
{"SUPER", ~0ULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ void AOClient::changeArea(int new_area)
|
|||||||
sendServerMessage("You are already in area " + server->area_names[current_area]);
|
sendServerMessage("You are already in area " + server->area_names[current_area]);
|
||||||
return;
|
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.");
|
sendServerMessage("Area " + server->area_names[new_area] + " is locked.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -486,7 +486,7 @@ AOPacket AOClient::validateIcPacket(AOPacket packet)
|
|||||||
// Spectators cannot use IC
|
// Spectators cannot use IC
|
||||||
return invalid;
|
return invalid;
|
||||||
AreaData* area = server->areas[current_area];
|
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
|
// Non-invited players cannot speak in spectatable areas
|
||||||
return invalid;
|
return invalid;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user