]> git.stg.codes - stg.git/blobdiff - projects/stargazer/plugins/other/smux/sensors.cpp
Fixed tests.
[stg.git] / projects / stargazer / plugins / other / smux / sensors.cpp
index 9cfdadd074bf053e1d61b82cbb41c6246816cfb1..f52a413b7aeff6543e3a4ccf32da5e67012cc0cf 100644 (file)
@@ -46,3 +46,16 @@ x2str(count, res);
 return res;
 }
 #endif
+
+bool ActiveUsersSensor::UserPredicate(USER_PTR userPtr) const
+{
+if (!userPtr->GetConnected())
+    return false;
+for (size_t i = 0; i < DIR_NUM; ++i)
+    {
+    if (userPtr->GetSessionUpload()[i] > 0 ||
+        userPtr->GetSessionDownload()[i] > 0)
+        return true;
+    }
+return false;
+}