aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authoronefang2021-08-18 01:23:58 +1000
committeronefang2021-08-18 01:23:58 +1000
commitfee80c3a1babd446f9cffb6046dfd599a310d62d (patch)
tree7c6718541bb56fd499f42685d62191a565f811a6
parentTODO++ (diff)
downloadopensim-SC-fee80c3a1babd446f9cffb6046dfd599a310d62d.zip
opensim-SC-fee80c3a1babd446f9cffb6046dfd599a310d62d.tar.gz
opensim-SC-fee80c3a1babd446f9cffb6046dfd599a310d62d.tar.bz2
opensim-SC-fee80c3a1babd446f9cffb6046dfd599a310d62d.tar.xz
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.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Application/OpenSim.cs11
1 files changed, 10 insertions, 1 deletions
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
925 { 925 {
926 case "users": 926 case "users":
927 IList agents; 927 IList agents;
928 int count = 0;
928 if (showParams.Length > 1 && showParams[1] == "full") 929 if (showParams.Length > 1 && showParams[1] == "full")
929 { 930 {
930 agents = SceneManager.GetCurrentScenePresences(); 931 agents = SceneManager.GetCurrentScenePresences();
@@ -933,8 +934,16 @@ namespace OpenSim
933 agents = SceneManager.GetCurrentSceneAvatars(); 934 agents = SceneManager.GetCurrentSceneAvatars();
934 } 935 }
935 936
936 MainConsole.Instance.Output(String.Format("\nAgents connected: {0}\n", agents.Count)); 937 foreach (ScenePresence presence in agents)
938 {
939 string type = presence.IsChildAgent ? "child" : "root";
937 940
941 if (presence.IsNPC)
942 type = "NPC";
943 if ("root" == type)
944 count++;
945 }
946 MainConsole.Instance.Output(String.Format("\nAgents connected: {0}\n", count));
938 MainConsole.Instance.Output( 947 MainConsole.Instance.Output(
939 String.Format("{0,-16} {1,-16} {2,-37} {3,-14} {4,-32} {5,-30}", "Firstname", "Lastname", 948 String.Format("{0,-16} {1,-16} {2,-37} {3,-14} {4,-32} {5,-30}", "Firstname", "Lastname",
940 "Agent ID", "child/NPC/root", "Region", "Position") 949 "Agent ID", "child/NPC/root", "Region", "Position")