From 5bfdb8c0035d6ad5bfb32ab4c72ecf31859f55a0 Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Thu, 22 May 2008 04:55:23 +0000 Subject: Adding basic show users functionality back in to console. Mantis 1212 --- OpenSim/Region/Application/OpenSimMainConsole.cs | 36 ++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'OpenSim') diff --git a/OpenSim/Region/Application/OpenSimMainConsole.cs b/OpenSim/Region/Application/OpenSimMainConsole.cs index 9350d7b..9e350d4 100644 --- a/OpenSim/Region/Application/OpenSimMainConsole.cs +++ b/OpenSim/Region/Application/OpenSimMainConsole.cs @@ -581,6 +581,42 @@ namespace OpenSim m_assetCache.ShowState(); break; + case "users": + IList agents = m_sceneManager.GetCurrentSceneAvatars(); + + m_console.Notice(String.Format("\nAgents connected: {0}\n", agents.Count)); + + m_console.Notice( + String.Format("{0,-16}{1,-16}{2,-37}{3,-16}", "Firstname", "Lastname", + "Agent ID","Region")); + + foreach (ScenePresence presence in agents) + { + RegionInfo regionInfo = m_sceneManager.GetRegionInfo(presence.RegionHandle); + string regionName; + System.Net.EndPoint ep = null; + + if (regionInfo == null) + { + regionName = "Unresolvable"; + } + else + { + regionName = regionInfo.RegionName; + } + + m_console.Notice( + String.Format( + "{0,-16}{1,-16}{2,-37}{3,-16}", + presence.Firstname, + presence.Lastname, + presence.UUID, + regionName)); + } + + m_console.Notice(""); + break; + case "modules": m_console.Notice("The currently loaded shared modules are:"); foreach (IRegionModule module in m_moduleLoader.GetLoadedSharedModules) -- cgit v1.1