diff options
author | BlueWall | 2012-06-04 17:22:46 -0400 |
---|---|---|
committer | BlueWall | 2012-06-04 17:25:38 -0400 |
commit | 3229e32b4e818c6a0897800d8770c95f90ee3a94 (patch) | |
tree | fe77a942cd12c5036063525355c74766f7c4f9a9 /OpenSim | |
parent | Remove profile from basic configuration (diff) | |
download | opensim-SC-3229e32b4e818c6a0897800d8770c95f90ee3a94.zip opensim-SC-3229e32b4e818c6a0897800d8770c95f90ee3a94.tar.gz opensim-SC-3229e32b4e818c6a0897800d8770c95f90ee3a94.tar.bz2 opensim-SC-3229e32b4e818c6a0897800d8770c95f90ee3a94.tar.xz |
Add replaceable region modules to the "show modules" command
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/Application/OpenSim.cs | 78 |
1 files changed, 49 insertions, 29 deletions
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index c0913c5..76ac827 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs | |||
@@ -971,8 +971,7 @@ namespace OpenSim | |||
971 | if (showParams.Length > 1 && showParams[1] == "full") | 971 | if (showParams.Length > 1 && showParams[1] == "full") |
972 | { | 972 | { |
973 | agents = m_sceneManager.GetCurrentScenePresences(); | 973 | agents = m_sceneManager.GetCurrentScenePresences(); |
974 | } | 974 | } else |
975 | else | ||
976 | { | 975 | { |
977 | agents = m_sceneManager.GetCurrentSceneAvatars(); | 976 | agents = m_sceneManager.GetCurrentSceneAvatars(); |
978 | } | 977 | } |
@@ -981,7 +980,8 @@ namespace OpenSim | |||
981 | 980 | ||
982 | MainConsole.Instance.Output( | 981 | MainConsole.Instance.Output( |
983 | String.Format("{0,-16} {1,-16} {2,-37} {3,-11} {4,-16} {5,-30}", "Firstname", "Lastname", | 982 | String.Format("{0,-16} {1,-16} {2,-37} {3,-11} {4,-16} {5,-30}", "Firstname", "Lastname", |
984 | "Agent ID", "Root/Child", "Region", "Position")); | 983 | "Agent ID", "Root/Child", "Region", "Position") |
984 | ); | ||
985 | 985 | ||
986 | foreach (ScenePresence presence in agents) | 986 | foreach (ScenePresence presence in agents) |
987 | { | 987 | { |
@@ -991,8 +991,7 @@ namespace OpenSim | |||
991 | if (regionInfo == null) | 991 | if (regionInfo == null) |
992 | { | 992 | { |
993 | regionName = "Unresolvable"; | 993 | regionName = "Unresolvable"; |
994 | } | 994 | } else |
995 | else | ||
996 | { | 995 | { |
997 | regionName = regionInfo.RegionName; | 996 | regionName = regionInfo.RegionName; |
998 | } | 997 | } |
@@ -1005,7 +1004,8 @@ namespace OpenSim | |||
1005 | presence.UUID, | 1004 | presence.UUID, |
1006 | presence.IsChildAgent ? "Child" : "Root", | 1005 | presence.IsChildAgent ? "Child" : "Root", |
1007 | regionName, | 1006 | regionName, |
1008 | presence.AbsolutePosition.ToString())); | 1007 | presence.AbsolutePosition.ToString()) |
1008 | ); | ||
1009 | } | 1009 | } |
1010 | 1010 | ||
1011 | MainConsole.Instance.Output(String.Empty); | 1011 | MainConsole.Instance.Output(String.Empty); |
@@ -1014,16 +1014,20 @@ namespace OpenSim | |||
1014 | case "connections": | 1014 | case "connections": |
1015 | System.Text.StringBuilder connections = new System.Text.StringBuilder("Connections:\n"); | 1015 | System.Text.StringBuilder connections = new System.Text.StringBuilder("Connections:\n"); |
1016 | m_sceneManager.ForEachScene( | 1016 | m_sceneManager.ForEachScene( |
1017 | delegate(Scene scene) | 1017 | delegate(Scene scene) { |
1018 | { | 1018 | scene.ForEachClient( |
1019 | scene.ForEachClient( | 1019 | delegate(IClientAPI client) { |
1020 | delegate(IClientAPI client) | 1020 | connections.AppendFormat( |
1021 | { | 1021 | "{0}: {1} ({2}) from {3} on circuit {4}\n", |
1022 | connections.AppendFormat("{0}: {1} ({2}) from {3} on circuit {4}\n", | 1022 | scene.RegionInfo.RegionName, |
1023 | scene.RegionInfo.RegionName, client.Name, client.AgentId, client.RemoteEndPoint, client.CircuitCode); | 1023 | client.Name, |
1024 | } | 1024 | client.AgentId, |
1025 | client.RemoteEndPoint, | ||
1026 | client.CircuitCode | ||
1025 | ); | 1027 | ); |
1026 | } | 1028 | } |
1029 | ); | ||
1030 | } | ||
1027 | ); | 1031 | ); |
1028 | 1032 | ||
1029 | MainConsole.Instance.Output(connections.ToString()); | 1033 | MainConsole.Instance.Output(connections.ToString()); |
@@ -1032,13 +1036,17 @@ namespace OpenSim | |||
1032 | case "circuits": | 1036 | case "circuits": |
1033 | System.Text.StringBuilder acd = new System.Text.StringBuilder("Agent Circuits:\n"); | 1037 | System.Text.StringBuilder acd = new System.Text.StringBuilder("Agent Circuits:\n"); |
1034 | m_sceneManager.ForEachScene( | 1038 | m_sceneManager.ForEachScene( |
1035 | delegate(Scene scene) | 1039 | delegate(Scene scene) { |
1036 | { | 1040 | //this.HttpServer. |
1037 | //this.HttpServer. | 1041 | acd.AppendFormat("{0}:\n", scene.RegionInfo.RegionName); |
1038 | acd.AppendFormat("{0}:\n", scene.RegionInfo.RegionName); | 1042 | foreach (AgentCircuitData aCircuit in scene.AuthenticateHandler.GetAgentCircuits().Values) |
1039 | foreach (AgentCircuitData aCircuit in scene.AuthenticateHandler.GetAgentCircuits().Values) | 1043 | acd.AppendFormat( |
1040 | acd.AppendFormat("\t{0} {1} ({2})\n", aCircuit.firstname, aCircuit.lastname, (aCircuit.child ? "Child" : "Root")); | 1044 | "\t{0} {1} ({2})\n", |
1041 | } | 1045 | aCircuit.firstname, |
1046 | aCircuit.lastname, | ||
1047 | (aCircuit.child ? "Child" : "Root") | ||
1048 | ); | ||
1049 | } | ||
1042 | ); | 1050 | ); |
1043 | 1051 | ||
1044 | MainConsole.Instance.Output(acd.ToString()); | 1052 | MainConsole.Instance.Output(acd.ToString()); |
@@ -1079,17 +1087,29 @@ namespace OpenSim | |||
1079 | } | 1087 | } |
1080 | 1088 | ||
1081 | m_sceneManager.ForEachScene( | 1089 | m_sceneManager.ForEachScene( |
1082 | delegate(Scene scene) | 1090 | delegate(Scene scene) { |
1091 | m_log.Error("The currently loaded modules in " + scene.RegionInfo.RegionName + " are:"); | ||
1092 | foreach (IRegionModule module in scene.Modules.Values) | ||
1083 | { | 1093 | { |
1084 | m_log.Error("The currently loaded modules in " + scene.RegionInfo.RegionName + " are:"); | 1094 | if (!module.IsSharedModule) |
1085 | foreach (IRegionModule module in scene.Modules.Values) | ||
1086 | { | 1095 | { |
1087 | if (!module.IsSharedModule) | 1096 | m_log.Error("Region Module: " + module.Name); |
1088 | { | ||
1089 | m_log.Error("Region Module: " + module.Name); | ||
1090 | } | ||
1091 | } | 1097 | } |
1092 | }); | 1098 | } |
1099 | } | ||
1100 | ); | ||
1101 | |||
1102 | m_sceneManager.ForEachScene( | ||
1103 | delegate(Scene scene) { | ||
1104 | MainConsole.Instance.Output("Loaded new region modules in" + scene.RegionInfo.RegionName + " are:"); | ||
1105 | foreach (IRegionModuleBase module in scene.RegionModules.Values) | ||
1106 | { | ||
1107 | Type type = module.GetType().GetInterface("ISharedRegionModule"); | ||
1108 | string module_type = type != null ? "Shared" : "Non-Shared"; | ||
1109 | MainConsole.Instance.OutputFormat("New Region Module ({0}): {1}", module_type, module.Name); | ||
1110 | } | ||
1111 | } | ||
1112 | ); | ||
1093 | 1113 | ||
1094 | MainConsole.Instance.Output(""); | 1114 | MainConsole.Instance.Output(""); |
1095 | break; | 1115 | break; |