]> git.stg.codes - stg.git/commitdiff
Merge branch 'log-unauth-reasons'
authorMaxim Mamontov <faust.madf@gmail.com>
Thu, 14 Nov 2013 20:01:45 +0000 (22:01 +0200)
committerMaxim Mamontov <faust.madf@gmail.com>
Thu, 14 Nov 2013 20:01:45 +0000 (22:01 +0200)
Conflicts:
projects/stargazer/user_impl.cpp

1  2 
include/stg/users.h
projects/stargazer/main.cpp
projects/stargazer/user_impl.cpp
projects/stargazer/user_impl.h
projects/stargazer/users_impl.cpp
projects/stargazer/users_impl.h

Simple merge
Simple merge
index 13cf0b77dc87cd4c1337c6cefc530db7e728572a,37178dd696d0bb3f77ad8776c17f7b490426fddb..7b0348bc57e75928936640cbed90d90bd9b28481
@@@ -536,7 -555,7 +536,8 @@@ if (!authorizedBy.erase(auth)
  
  if (authorizedBy.empty())
      {
 +    authorizedModificationTime = stgTime;
+     lastDisconnectReason = reason;
      lastIPForDisconnect = currIP;
      currIP = 0; // DelUser in traffcounter
      return;
index 26ff58fc2b8d902f093739e4cc867f1670a43794,6f6030ca40d02474af7f554aa676aee30b7e349e..68945d2c65547efc9ef230ce3d9ef9810aaf4bcc
@@@ -184,11 -183,10 +184,12 @@@ public
  
      bool            GetConnected() const { return connected; }
      time_t          GetConnectedModificationTime() const { return connected.ModificationTime(); }
 +    const std::string & GetLastDisconnectReason() const { return lastDisconnectReason; }
      int             GetAuthorized() const { return static_cast<int>(authorizedBy.size()); }
 +    time_t          GetAuthorizedModificationTime() const { return authorizedModificationTime; }
      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;
  
Simple merge
Simple merge