X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/40079f3d50a559ea36705b72b2fe2d190a6cc354..04711171fa39f7b76f5f4f291a016ddbe4ddcccd:/projects/stargazer/user_impl.h diff --git a/projects/stargazer/user_impl.h b/projects/stargazer/user_impl.h index a581f2e5..6f6030ca 100644 --- a/projects/stargazer/user_impl.h +++ b/projects/stargazer/user_impl.h @@ -185,7 +185,8 @@ public: time_t GetConnectedModificationTime() const { return connected.ModificationTime(); } int GetAuthorized() const { return static_cast(authorizedBy.size()); } int Authorize(uint32_t ip, uint32_t enabledDirs, const AUTH * auth); - void Unauthorize(const AUTH * auth); + void Unauthorize(const AUTH * auth, + const std::string & reason = std::string()); bool IsAuthorizedBy(const AUTH * auth) const; std::vector GetAuthorizers() const; @@ -249,6 +250,7 @@ private: USER_PROPERTY currIP; uint32_t lastIPForDisconnect; // User's ip after unauth but before disconnect + std::string lastDisconnectReason; time_t pingTime;