move CM check before auth check

This commit is contained in:
in1tiate 2021-03-04 05:27:00 -06:00 committed by GitHub
parent 3aa937f908
commit 62b3f8647f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -264,16 +264,14 @@ void AOClient::sendServerBroadcast(QString message)
bool AOClient::checkAuth(unsigned long long acl_mask)
{
if (acl_mask != ACLFlags.value("NONE")) {
if (!authenticated && acl_mask != ACLFlags.value("CM")) {
return false;
}
if (acl_mask == ACLFlags.value("CM")) {
AreaData* area = server->areas[current_area];
if (area->owners.contains(id))
return true;
}
else if (!authenticated) {
return false;
}
QSettings settings("config/config.ini", QSettings::IniFormat);
settings.beginGroup("Options");
QString auth_type = settings.value("auth", "simple").toString();