X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/e08647faf449d1e8b4b214e0e1891203e322f76a..28e7683d83570df1fc6b44a74e8eb0782b8bd9a2:/projects/stargazer/plugins/other/smux/sensors.cpp

diff --git a/projects/stargazer/plugins/other/smux/sensors.cpp b/projects/stargazer/plugins/other/smux/sensors.cpp
index 9cfdadd0..f52a413b 100644
--- a/projects/stargazer/plugins/other/smux/sensors.cpp
+++ b/projects/stargazer/plugins/other/smux/sensors.cpp
@@ -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;
+}