X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/2395ee39f86d9ec56e74c3d8dd388b3d2c2e1aaf..e470c81abda3653a5ef2e3cff7b610aa823fe9b4:/projects/stargazer/users_impl.cpp diff --git a/projects/stargazer/users_impl.cpp b/projects/stargazer/users_impl.cpp index 7b110431..6b87b5a9 100644 --- a/projects/stargazer/users_impl.cpp +++ b/projects/stargazer/users_impl.cpp @@ -280,9 +280,6 @@ if (FindByNameNonLock(login, &iter)) return false; } -if (iter->Authorize(ip, enabledDirs, auth)) - return false; - if (FindByIPIdx(ip, iter)) { if (iter->GetLogin() != login) @@ -292,9 +289,14 @@ if (FindByIPIdx(ip, iter)) iter->GetLogin().c_str()); return false; } + if (iter->Authorize(ip, enabledDirs, auth)) + return false; return true; } +if (iter->Authorize(ip, enabledDirs, auth)) + return false; + AddToIPIdx(iter); return true; }