diff options
-rw-r--r-- | OpenSim/Framework/AgentCircuitData.cs | 5 | ||||
-rw-r--r-- | OpenSim/Region/Application/OpenSim.cs | 51 |
2 files changed, 36 insertions, 20 deletions
diff --git a/OpenSim/Framework/AgentCircuitData.cs b/OpenSim/Framework/AgentCircuitData.cs index 57fb808..ffcc584 100644 --- a/OpenSim/Framework/AgentCircuitData.cs +++ b/OpenSim/Framework/AgentCircuitData.cs | |||
@@ -99,6 +99,11 @@ namespace OpenSim.Framework | |||
99 | public string lastname; | 99 | public string lastname; |
100 | 100 | ||
101 | /// <summary> | 101 | /// <summary> |
102 | /// Agent's full name. | ||
103 | /// </summary> | ||
104 | public string Name { get { return string.Format("{0} {1}", firstname, lastname); } } | ||
105 | |||
106 | /// <summary> | ||
102 | /// Random Unique GUID for this session. Client gets this at login and it's | 107 | /// Random Unique GUID for this session. Client gets this at login and it's |
103 | /// only supposed to be disclosed over secure channels | 108 | /// only supposed to be disclosed over secure channels |
104 | /// </summary> | 109 | /// </summary> |
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index e980716..230af8e 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs | |||
@@ -1000,22 +1000,7 @@ namespace OpenSim | |||
1000 | break; | 1000 | break; |
1001 | 1001 | ||
1002 | case "circuits": | 1002 | case "circuits": |
1003 | System.Text.StringBuilder acd = new System.Text.StringBuilder("Agent Circuits:\n"); | 1003 | HandleShowCircuits(); |
1004 | m_sceneManager.ForEachScene( | ||
1005 | delegate(Scene scene) { | ||
1006 | //this.HttpServer. | ||
1007 | acd.AppendFormat("{0}:\n", scene.RegionInfo.RegionName); | ||
1008 | foreach (AgentCircuitData aCircuit in scene.AuthenticateHandler.GetAgentCircuits().Values) | ||
1009 | acd.AppendFormat( | ||
1010 | "\t{0} {1} ({2})\n", | ||
1011 | aCircuit.firstname, | ||
1012 | aCircuit.lastname, | ||
1013 | (aCircuit.child ? "Child" : "Root") | ||
1014 | ); | ||
1015 | } | ||
1016 | ); | ||
1017 | |||
1018 | MainConsole.Instance.Output(acd.ToString()); | ||
1019 | break; | 1004 | break; |
1020 | 1005 | ||
1021 | case "http-handlers": | 1006 | case "http-handlers": |
@@ -1120,19 +1105,45 @@ namespace OpenSim | |||
1120 | } | 1105 | } |
1121 | } | 1106 | } |
1122 | 1107 | ||
1108 | private void HandleShowCircuits() | ||
1109 | { | ||
1110 | ConsoleDisplayTable cdt = new ConsoleDisplayTable(); | ||
1111 | cdt.AddColumn("Region", 20); | ||
1112 | cdt.AddColumn("Avatar name", 24); | ||
1113 | cdt.AddColumn("Type", 5); | ||
1114 | cdt.AddColumn("Code", 10); | ||
1115 | cdt.AddColumn("IP", 16); | ||
1116 | cdt.AddColumn("Viewer Name", 24); | ||
1117 | |||
1118 | m_sceneManager.ForEachScene( | ||
1119 | s => | ||
1120 | { | ||
1121 | foreach (AgentCircuitData aCircuit in s.AuthenticateHandler.GetAgentCircuits().Values) | ||
1122 | cdt.AddRow( | ||
1123 | s.Name, | ||
1124 | aCircuit.Name, | ||
1125 | aCircuit.child ? "child" : "root", | ||
1126 | aCircuit.circuitcode.ToString(), | ||
1127 | aCircuit.IPAddress.ToString(), | ||
1128 | aCircuit.Viewer); | ||
1129 | }); | ||
1130 | |||
1131 | MainConsole.Instance.Output(cdt.ToString()); | ||
1132 | } | ||
1133 | |||
1123 | private void HandleShowConnections() | 1134 | private void HandleShowConnections() |
1124 | { | 1135 | { |
1125 | ConsoleDisplayTable cdt = new ConsoleDisplayTable(); | 1136 | ConsoleDisplayTable cdt = new ConsoleDisplayTable(); |
1126 | cdt.AddColumn("Region", 20); | 1137 | cdt.AddColumn("Region", 20); |
1127 | cdt.AddColumn("Avatar name", 25); | 1138 | cdt.AddColumn("Avatar name", 24); |
1128 | cdt.AddColumn("Remote endpoint", 23); | 1139 | cdt.AddColumn("Circuit code", 12); |
1129 | cdt.AddColumn("Circuit number", 14); | 1140 | cdt.AddColumn("Endpoint", 23); |
1130 | cdt.AddColumn("Active?", 7); | 1141 | cdt.AddColumn("Active?", 7); |
1131 | 1142 | ||
1132 | m_sceneManager.ForEachScene( | 1143 | m_sceneManager.ForEachScene( |
1133 | s => s.ForEachClient( | 1144 | s => s.ForEachClient( |
1134 | c => cdt.AddRow( | 1145 | c => cdt.AddRow( |
1135 | s.RegionInfo.RegionName, | 1146 | s.Name, |
1136 | c.Name, | 1147 | c.Name, |
1137 | c.RemoteEndPoint.ToString(), | 1148 | c.RemoteEndPoint.ToString(), |
1138 | c.CircuitCode.ToString(), | 1149 | c.CircuitCode.ToString(), |