]> git.stg.codes - stg.git/blobdiff - projects/stargazer/user_impl.h
Merge branch 'log-unauth-reasons' into full-month-stats
[stg.git] / projects / stargazer / user_impl.h
index a581f2e55c48f586d98017e69c016e36ba7b8b2c..6f6030ca40d02474af7f554aa676aee30b7e349e 100644 (file)
@@ -185,7 +185,8 @@ public:
     time_t          GetConnectedModificationTime() const { return connected.ModificationTime(); }
     int             GetAuthorized() const { return static_cast<int>(authorizedBy.size()); }
     int             Authorize(uint32_t ip, uint32_t enabledDirs, const AUTH * auth);
     time_t          GetConnectedModificationTime() const { return connected.ModificationTime(); }
     int             GetAuthorized() const { return static_cast<int>(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<std::string> GetAuthorizers() const;
 
     bool            IsAuthorizedBy(const AUTH * auth) const;
     std::vector<std::string> GetAuthorizers() const;
 
@@ -249,6 +250,7 @@ private:
     USER_PROPERTY<uint32_t> currIP;
 
     uint32_t        lastIPForDisconnect; // User's ip after unauth but before disconnect
     USER_PROPERTY<uint32_t> currIP;
 
     uint32_t        lastIPForDisconnect; // User's ip after unauth but before disconnect
+    std::string     lastDisconnectReason;
 
     time_t          pingTime;
 
 
     time_t          pingTime;