]> git.stg.codes - stg.git/blobdiff - projects/stargazer/user.h
Метод INETACCESS::DelUser зроблено приватним
[stg.git] / projects / stargazer / user.h
index 7a9896bfcba77caac35677f2b449ff107838db39..1c84ba1ca5e8b3c9b00f9baf22a3b1d0d131e7d4 100644 (file)
@@ -144,9 +144,7 @@ public:
     void            ResetPassiveTime() { passiveTime = 0; }
     void            SetPassiveTimeAsNewUser();
 
-    void            ResetDetailStat();
-    int             SwapDetailStat();
-    int             WriteDetailStat();
+    int             WriteDetailStat(bool hard = false);
 
     const TARIFF *  GetTariff() const { return tariff; }
     void            ResetNextTariff() { nextTariff = ""; }
@@ -204,9 +202,8 @@ private:
     void            Disconnect(bool fakeDisconnect, const std::string & reason);
     int             SaveMonthStat(int month, int year);
 
-    int             SendMessage(const STG_MSG & msg);
-    int             RemoveMessage(uint64_t) { return 0; }
-    int             ScanMessage();
+    int             SendMessage(STG_MSG & msg) const;
+    void            ScanMessage();
     time_t          lastScanMessages;
 
     string          login;
@@ -235,10 +232,8 @@ private:
     const TARIFFS * tariffs;
     const TARIFF *  tariff;
 
-    map<IP_DIR_PAIR, STAT_NODE>     traffStatInternal[2];
-    map<IP_DIR_PAIR, STAT_NODE> *   traffStat;
-    map<IP_DIR_PAIR, STAT_NODE> *   traffStatToWrite;
-    int                             traffStatInUse;
+    TRAFF_STAT      traffStat;
+    std::pair<time_t, TRAFF_STAT> traffStatSaved;
 
     const SETTINGS * settings;
 
@@ -246,13 +241,12 @@ private:
 
     const map<uint32_t, user_iter> * ipIndex;
 
+    list<STG_MSG> messages;
+
     bool            deleted;
 
     time_t          lastWriteStat;           // ÷ÒÅÍÑ ÐÏÓÌÅÄÎÅÊ ÚÁÐÉÓÉ ÓÔÁÔÉÓÔÉËÉ
     time_t          lastWriteDeatiledStat;   // ÷ÒÅÍÑ ÐÏÓÌÅÄÎÅÊ ÚÁÐÉÓÉ ÄÅÔÁÌØÎÏÊ ÓÔÁÔÉÓÔÉËÉ
-    time_t          lastSwapDeatiledStat;    // ÷ÒÅÍÑ ÐÏÓÌÅÄÎÅÊ ÚÁÐÉÓÉ ÄÅÔÁÌØÎÏÊ ÓÔÁÔÉÓÔÉËÉ
-
-    bool            writeFreeMbTraffCost;
 
     // Properties
     USER_PROPERTY<double>         & cash;