From 8ae8bec4d148ace42aa176f924399464d5bcf7eb Mon Sep 17 00:00:00 2001
From: Homer Horwitz
Date: Fri, 12 Sep 2008 22:39:17 +0000
Subject: Changed "show users" command to display only root agents, "show users
full" to display root and child agents (mantis #2171).
---
OpenSim/Region/Application/OpenSim.cs | 22 ++++++++++++++++------
OpenSim/Region/Environment/Scenes/Scene.cs | 6 +++---
2 files changed, 19 insertions(+), 9 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index 43c1d26..4cf34bc 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -269,7 +269,8 @@ namespace OpenSim
m_console.Notice("script - manually trigger scripts? or script commands?");
m_console.Notice("set-time [x] - set the current scene time phase");
m_console.Notice("show assets - show state of asset cache.");
- m_console.Notice("show users - show info about connected users.");
+ m_console.Notice("show users - show info about connected users (only root agents).");
+ m_console.Notice("show users full - show info about connected users (root and child agents).");
m_console.Notice("show modules - shows info about loaded modules.");
m_console.Notice("show regions - show running region information.");
m_console.Notice("config set section field value - set a config value");
@@ -634,7 +635,8 @@ namespace OpenSim
m_console.Notice("script - manually trigger scripts? or script commands?");
m_console.Notice("set-time [x] - set the current scene time phase");
m_console.Notice("show assets - show state of asset cache.");
- m_console.Notice("show users - show info about connected users.");
+ m_console.Notice("show users - show info about connected users (only root agents).");
+ m_console.Notice("show users full - show info about connected users (root and child agents).");
m_console.Notice("show modules - shows info about loaded modules.");
m_console.Notice("show regions - show running region information.");
m_console.Notice("config set section field value - set a config value");
@@ -652,18 +654,26 @@ namespace OpenSim
}
// see BaseOpenSimServer
- public override void Show(string ShowWhat)
+ public override void Show(string[] showParams)
{
- base.Show(ShowWhat);
+ base.Show(showParams);
- switch (ShowWhat)
+ switch (showParams[0])
{
case "assets":
m_assetCache.ShowState();
break;
case "users":
- IList agents = m_sceneManager.GetCurrentScenePresences();
+ IList agents;
+ if (showParams.Length > 1 && showParams[1] == "full")
+ {
+ agents = m_sceneManager.GetCurrentScenePresences();
+ }
+ else
+ {
+ agents = m_sceneManager.GetCurrentSceneAvatars();
+ }
m_console.Notice(String.Format("\nAgents connected: {0}\n", agents.Count));
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index da76ab8..7116904 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -3468,10 +3468,10 @@ namespace OpenSim.Region.Environment.Scenes
///
/// Shows various details about the sim based on the parameters supplied by the console command in openSimMain.
///
- ///
- public void Show(string showWhat)
+ /// What to show
+ public void Show(string[] showParams)
{
- switch (showWhat)
+ switch (showParams[0])
{
case "users":
m_log.Error("Current Region: " + RegionInfo.RegionName);
--
cgit v1.1