aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorMW2007-09-04 17:09:47 +0000
committerMW2007-09-04 17:09:47 +0000
commit0eef82291edd7d0c691aa3d08ad6e5a7968110f9 (patch)
tree4cde0d86f4e211d35e107cbfe5ead4550e27c9b7 /OpenSim/Region
parentUsing change-region without a region name will now display the currently acti... (diff)
downloadopensim-SC-0eef82291edd7d0c691aa3d08ad6e5a7968110f9.zip
opensim-SC-0eef82291edd7d0c691aa3d08ad6e5a7968110f9.tar.gz
opensim-SC-0eef82291edd7d0c691aa3d08ad6e5a7968110f9.tar.bz2
opensim-SC-0eef82291edd7d0c691aa3d08ad6e5a7968110f9.tar.xz
Added "show modules" command that if at root level will display a list of loaded "shared modules" (modules instances that are shared by multiple regions) or if a region is set then will display the list of local modules loaded in that region.
Can now use "show users" when a region is set, to have a list of users in just that region displayed.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Application/OpenSimMain.cs7
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs53
2 files changed, 57 insertions, 3 deletions
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs
index f84e8fc..c94d328 100644
--- a/OpenSim/Region/Application/OpenSimMain.cs
+++ b/OpenSim/Region/Application/OpenSimMain.cs
@@ -585,6 +585,13 @@ namespace OpenSim
585 } 585 }
586 } 586 }
587 break; 587 break;
588 case "modules":
589 m_log.Error("The currently loaded shared modules are:");
590 foreach (OpenSim.Region.Environment.Interfaces.IRegionModule module in m_moduleLoader.LoadedSharedModules.Values)
591 {
592 m_log.Error("Shared Module: " + module.GetName());
593 }
594 break;
588 } 595 }
589 } 596 }
590 597
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 3122c5d..f8d17b4 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -92,9 +92,9 @@ namespace OpenSim.Region.Environment.Scenes
92 92
93 // this most likely shouldn't be handled as a API method like this, but doing it for testing purposes 93 // this most likely shouldn't be handled as a API method like this, but doing it for testing purposes
94 public ModuleAPIMethod2<bool, string, byte[]> AddXferFile = null; 94 public ModuleAPIMethod2<bool, string, byte[]> AddXferFile = null;
95 95
96 private ISimChat m_simChatModule = null; 96 private ISimChat m_simChatModule = null;
97 97
98 #region Properties 98 #region Properties
99 99
100 public AgentCircuitManager AuthenticateHandler 100 public AgentCircuitManager AuthenticateHandler
@@ -1133,7 +1133,7 @@ namespace OpenSim.Region.Environment.Scenes
1133 return false; 1133 return false;
1134 } 1134 }
1135 1135
1136 public void RegisterModuleInterface<M>( M mod) 1136 public void RegisterModuleInterface<M>(M mod)
1137 { 1137 {
1138 if (!this.ModuleInterfaces.ContainsKey(typeof(M))) 1138 if (!this.ModuleInterfaces.ContainsKey(typeof(M)))
1139 { 1139 {
@@ -1231,6 +1231,12 @@ namespace OpenSim.Region.Environment.Scenes
1231 { 1231 {
1232 switch (command) 1232 switch (command)
1233 { 1233 {
1234 case "show":
1235 if (cmdparams.Length > 0)
1236 {
1237 Show(cmdparams[0]);
1238 }
1239 break;
1234 case "save-xml": 1240 case "save-xml":
1235 if (cmdparams.Length > 0) 1241 if (cmdparams.Length > 0)
1236 { 1242 {
@@ -1271,6 +1277,47 @@ namespace OpenSim.Region.Environment.Scenes
1271 } 1277 }
1272 } 1278 }
1273 1279
1280 public void Show(string ShowWhat)
1281 {
1282 switch (ShowWhat)
1283 {
1284 case "users":
1285 MainLog.Instance.Error("Current Region: " + RegionInfo.RegionName);
1286 MainLog.Instance.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"));
1287
1288 foreach (EntityBase entity in Entities.Values)
1289 {
1290 if (entity is ScenePresence)
1291 {
1292 ScenePresence scenePrescence = entity as ScenePresence;
1293 if (!scenePrescence.childAgent)
1294 {
1295 MainLog.Instance.Error(
1296 String.Format("{0,-16}{1,-16}{2,-25}{3,-25}{4,-16},{5,-16}{6,-16}",
1297 scenePrescence.Firstname,
1298 scenePrescence.Lastname,
1299 scenePrescence.UUID,
1300 scenePrescence.ControllingClient.AgentId,
1301 "Unknown",
1302 "Unknown",
1303 RegionInfo.RegionName));
1304 }
1305 }
1306 }
1307 break;
1308 case "modules":
1309 MainLog.Instance.Error("The currently loaded modules in " + this.RegionInfo.RegionName + " are:");
1310 foreach (OpenSim.Region.Environment.Interfaces.IRegionModule module in this.Modules.Values)
1311 {
1312 if (!module.IsSharedModule())
1313 {
1314 MainLog.Instance.Error("Region Module: " + module.GetName());
1315 }
1316 }
1317 break;
1318 }
1319 }
1320
1274 #region Script Engine 1321 #region Script Engine
1275 private List<OpenSim.Region.Environment.Scenes.Scripting.ScriptEngineInterface> ScriptEngines = new List<OpenSim.Region.Environment.Scenes.Scripting.ScriptEngineInterface>(); 1322 private List<OpenSim.Region.Environment.Scenes.Scripting.ScriptEngineInterface> ScriptEngines = new List<OpenSim.Region.Environment.Scenes.Scripting.ScriptEngineInterface>();
1276 public void AddScriptEngine(OpenSim.Region.Environment.Scenes.Scripting.ScriptEngineInterface ScriptEngine, LogBase m_logger) 1323 public void AddScriptEngine(OpenSim.Region.Environment.Scenes.Scripting.ScriptEngineInterface ScriptEngine, LogBase m_logger)