From fee80c3a1babd446f9cffb6046dfd599a310d62d Mon Sep 17 00:00:00 2001 From: onefang Date: Wed, 18 Aug 2021 01:23:58 +1000 Subject: It's 'show users', so don't count NPCs or child avatars. The sledjchisl stop function takes account of that, and wont shutdown sims with actual people on them. --- OpenSim/Region/Application/OpenSim.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 8e3f909..09782ac 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -925,6 +925,7 @@ namespace OpenSim { case "users": IList agents; + int count = 0; if (showParams.Length > 1 && showParams[1] == "full") { agents = SceneManager.GetCurrentScenePresences(); @@ -933,8 +934,16 @@ namespace OpenSim agents = SceneManager.GetCurrentSceneAvatars(); } - MainConsole.Instance.Output(String.Format("\nAgents connected: {0}\n", agents.Count)); + foreach (ScenePresence presence in agents) + { + string type = presence.IsChildAgent ? "child" : "root"; + if (presence.IsNPC) + type = "NPC"; + if ("root" == type) + count++; + } + MainConsole.Instance.Output(String.Format("\nAgents connected: {0}\n", count)); MainConsole.Instance.Output( String.Format("{0,-16} {1,-16} {2,-37} {3,-14} {4,-32} {5,-30}", "Firstname", "Lastname", "Agent ID", "child/NPC/root", "Region", "Position") -- cgit v1.1