X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/4f1aca7dfb6adf867713ad48e14ad79080e13cfa..60995b1933ff94757d2d29629f324d16070de1ea:/projects/stargazer/users_impl.cpp diff --git a/projects/stargazer/users_impl.cpp b/projects/stargazer/users_impl.cpp index dfdc8634..97b4bbbc 100644 --- a/projects/stargazer/users_impl.cpp +++ b/projects/stargazer/users_impl.cpp @@ -298,7 +298,9 @@ AddToIPIdx(iter); return true; } //----------------------------------------------------------------------------- -bool USERS_IMPL::Unauthorize(const std::string & login, const AUTH * auth) +bool USERS_IMPL::Unauthorize(const std::string & login, + const AUTH * auth, + const std::string & reason) { user_iter iter; STG_LOCKER lock(&mutex, __FILE__, __LINE__); @@ -310,7 +312,7 @@ if (FindByNameNonLock(login, &iter)) uint32_t ip = iter->GetCurrIP(); -iter->Unauthorize(auth); +iter->Unauthorize(auth, reason); if (!iter->GetAuthorized()) DelFromIPIdx(ip); @@ -702,7 +704,9 @@ std::list::const_iterator iter; iter = users.begin(); while (iter != users.end()) { - if (iter->GetLogin() != login && iter->GetProperty().ips.Get().IsIPInIPS(ip)) + if (iter->GetLogin() != login && + !iter->GetProperty().ips.Get().IsAnyIP() && + iter->GetProperty().ips.Get().IsIPInIPS(ip)) { if (user != NULL) *user = &(*iter);