diff options
-rw-r--r-- | OpenSim/Region/Application/OpenSim.cs | 35 |
1 files changed, 16 insertions, 19 deletions
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 56ad5c9..f3e4a2d 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs | |||
@@ -996,25 +996,7 @@ namespace OpenSim | |||
996 | break; | 996 | break; |
997 | 997 | ||
998 | case "connections": | 998 | case "connections": |
999 | System.Text.StringBuilder connections = new System.Text.StringBuilder("Connections:\n"); | 999 | HandleShowConnections(); |
1000 | m_sceneManager.ForEachScene( | ||
1001 | delegate(Scene scene) { | ||
1002 | scene.ForEachClient( | ||
1003 | delegate(IClientAPI client) { | ||
1004 | connections.AppendFormat( | ||
1005 | "{0}: {1} ({2}) from {3} on circuit {4}\n", | ||
1006 | scene.RegionInfo.RegionName, | ||
1007 | client.Name, | ||
1008 | client.AgentId, | ||
1009 | client.RemoteEndPoint, | ||
1010 | client.CircuitCode | ||
1011 | ); | ||
1012 | } | ||
1013 | ); | ||
1014 | } | ||
1015 | ); | ||
1016 | |||
1017 | MainConsole.Instance.Output(connections.ToString()); | ||
1018 | break; | 1000 | break; |
1019 | 1001 | ||
1020 | case "circuits": | 1002 | case "circuits": |
@@ -1138,6 +1120,21 @@ namespace OpenSim | |||
1138 | } | 1120 | } |
1139 | } | 1121 | } |
1140 | 1122 | ||
1123 | private void HandleShowConnections() | ||
1124 | { | ||
1125 | ConsoleDisplayTable cdt = new ConsoleDisplayTable(); | ||
1126 | cdt.AddColumn("Region", 20); | ||
1127 | cdt.AddColumn("Avatar name", 25); | ||
1128 | cdt.AddColumn("Remote endpoint", 23); | ||
1129 | cdt.AddColumn("Circuit number", 14); | ||
1130 | |||
1131 | m_sceneManager.ForEachScene( | ||
1132 | s => s.ForEachClient( | ||
1133 | c => cdt.AddRow(s.RegionInfo.RegionName, c.Name, c.RemoteEndPoint.ToString(), c.CircuitCode.ToString()))); | ||
1134 | |||
1135 | MainConsole.Instance.Output(cdt.ToString()); | ||
1136 | } | ||
1137 | |||
1141 | /// <summary> | 1138 | /// <summary> |
1142 | /// Use XML2 format to serialize data to a file | 1139 | /// Use XML2 format to serialize data to a file |
1143 | /// </summary> | 1140 | /// </summary> |