]> git.stg.codes - stg.git/blobdiff - projects/stargazer/plugins/other/smux/sensors.cpp
Set services and corps to plugins
[stg.git] / projects / stargazer / plugins / other / smux / sensors.cpp
index 7721d7b7dc3831a4889bb6225992d8e29c9cf18c..6018566c72d358efeac54bda5246d797bb6eb06b 100644 (file)
@@ -23,3 +23,26 @@ users.CloseSearch(handle);
 ValueToOS(count, objectSyntax);
 return true;
 }
 ValueToOS(count, objectSyntax);
 return true;
 }
+
+#ifdef DEBUG
+std::string UsersSensor::ToString() const
+{
+int handle = users.OpenSearch();
+if (!handle)
+    return "";
+
+USER_PTR user;
+size_t count = 0;
+while (!users.SearchNext(handle, &user))
+    {
+    if (UserPredicate(user))
+        ++count;
+    }
+
+users.CloseSearch(handle);
+
+std::string res;
+x2str(count, res);
+return res;
+}
+#endif