From 62b3f8647f39ce70159a2e587067aebfa3a3cefd Mon Sep 17 00:00:00 2001 From: in1tiate <32779090+in1tiate@users.noreply.github.com> Date: Thu, 4 Mar 2021 05:27:00 -0600 Subject: [PATCH] move CM check before auth check --- src/aoclient.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/aoclient.cpp b/src/aoclient.cpp index 0e7f1f3..344eebf 100644 --- a/src/aoclient.cpp +++ b/src/aoclient.cpp @@ -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();