]> git.stg.codes - stg.git/blobdiff - include/user_stat.h
Unused modules removed from inetaccess plugin
[stg.git] / include / user_stat.h
index 126c20f46d0424151ea61592d28268ec8978b453..42d436fdc96c472675eef9f2e5d0ce980d4db05e 100644 (file)
@@ -74,6 +74,22 @@ struct IP_DIR_PAIR
         return false;
         }
     //------------------------
+    bool operator!=(const IP_DIR_PAIR & rvalue) const
+        {
+        if (ip != rvalue.ip)
+            return true;
+
+        #ifdef TRAFF_STAT_WITH_PORTS
+        if (port != rvalue.port)
+            return true;
+        #endif
+
+        if (dir != rvalue.dir)
+            return true;
+
+        return false;
+        }
+    //------------------------
     uint32_t        ip;
     int             dir;
     #ifdef TRAFF_STAT_WITH_PORTS
@@ -146,7 +162,7 @@ struct USER_STAT_RES
         down = us.down;
         return * this;
     };
-    operator USER_STAT()
+    operator USER_STAT() const
     {
         USER_STAT us;
         us.cash             = cash;
@@ -171,6 +187,3 @@ struct USER_STAT_RES
 };
 //-----------------------------------------------------------------------------
 #endif
-
-
-