don't allow for locked areas with no cm
This commit is contained in:
parent
bd471eda00
commit
07a19fe8cd
@ -68,10 +68,17 @@ void AOClient::clientDisconnected()
|
||||
false;
|
||||
server->updateCharsTaken(server->areas[current_area]);
|
||||
}
|
||||
bool update_locks;
|
||||
for (AreaData* area : server->areas) {
|
||||
area->owners.removeAll(id);
|
||||
area->invited.removeAll(id);
|
||||
if (area->owners.isEmpty() && area->locked != AreaData::FREE) {
|
||||
area->locked = AreaData::FREE;
|
||||
update_locks = true;
|
||||
}
|
||||
}
|
||||
if (update_locks)
|
||||
arup(ARUPType::LOCKED, true);
|
||||
arup(ARUPType::CM, true);
|
||||
}
|
||||
|
||||
|
@ -504,8 +504,13 @@ void AOClient::cmdUnCM(int argc, QStringList argv)
|
||||
area->invited.removeAll(id);
|
||||
sendServerMessage("You are no longer CM in this area.");
|
||||
arup(ARUPType::CM, true);
|
||||
if (area->owners.isEmpty())
|
||||
if (area->owners.isEmpty()) {
|
||||
area->invited.clear();
|
||||
if (area->locked != AreaData::FREE) {
|
||||
area->locked = AreaData::FREE;
|
||||
arup(ARUPType::LOCKED, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void AOClient::cmdInvite(int argc, QStringList argv)
|
||||
|
Loading…
Reference in New Issue
Block a user