From 9924f35613e7cbb1a30316c032f16e69234d9983 Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Mon, 6 Aug 2007 13:21:30 +0000 Subject: * encapsulated firstname/lastname on ScenePresence * fixed 'users' console command * minor refactorings --- OpenSim/Region/Application/OpenSimMain.cs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region/Application') diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index 7fb48b0..28d0477 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs @@ -65,7 +65,7 @@ namespace OpenSim protected List m_udpServers = new List(); protected List m_regionData = new List(); - protected List m_localScenes = new List(); + protected List m_localScenes = new List(); private bool m_silent; private string m_logFilename = ("region-console-" + Guid.NewGuid().ToString() + ".log"); @@ -430,16 +430,15 @@ namespace OpenSim m_log.Error("That is " + (DateTime.Now - m_startuptime).ToString()); break; case "users": - ScenePresence TempAv; m_log.Error(String.Format("{0,-16}{1,-16}{2,-25}{3,-25}{4,-16}{5,-16}{6,-16}", "Firstname", "Lastname", "Agent ID", "Session ID", "Circuit", "IP", "World")); for (int i = 0; i < m_localScenes.Count; i++) { - foreach (libsecondlife.LLUUID UUID in ((Scene)m_localScenes[i]).Entities.Keys) + foreach (Entity entity in m_localScenes[i].Entities.Values ) { - if (((Scene)m_localScenes[i]).Entities[UUID].ToString() == "OpenSim.world.Avatar") + if ( entity is ScenePresence ) { - TempAv = (ScenePresence)((Scene)m_localScenes[i]).Entities[UUID]; - m_log.Error(String.Format("{0,-16}{1,-16}{2,-25}{3,-25}{4,-16},{5,-16}{6,-16}", TempAv.firstname, TempAv.lastname, UUID, TempAv.ControllingClient.AgentId, "Unknown", "Unknown"), ((Scene)m_localScenes[i]).RegionInfo.RegionName); + ScenePresence scenePrescence = entity as ScenePresence; + m_log.Error(String.Format("{0,-16}{1,-16}{2,-25}{3,-25}{4,-16},{5,-16}{6,-16}", scenePrescence.Firstname, scenePrescence.Lastname, scenePrescence.UUID, scenePrescence.ControllingClient.AgentId, "Unknown", "Unknown"), ((Scene)m_localScenes[i]).RegionInfo.RegionName); } } } -- cgit v1.1