From d3a46b03bf8761f5917b324392aa60b10cd9e078 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 29 Nov 2011 16:29:11 +0000 Subject: tabulate "show caps" output for easier readability --- .../CoreModules/Framework/Caps/CapabilitiesModule.cs | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/CoreModules') diff --git a/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs b/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs index afbd902..780411f 100644 --- a/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs +++ b/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs @@ -29,6 +29,7 @@ using System; using System.Collections; using System.Collections.Generic; using System.Reflection; +using System.Text; using log4net; using Nini.Config; using Mono.Addins; @@ -46,6 +47,8 @@ namespace OpenSim.Region.CoreModules.Framework public class CapabilitiesModule : INonSharedRegionModule, ICapabilitiesModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + + private string m_showCapsCommandFormat = " {0,-38} {1,-60}\n"; protected Scene m_scene; @@ -68,7 +71,7 @@ namespace OpenSim.Region.CoreModules.Framework m_scene.RegisterModuleInterface(this); MainConsole.Instance.Commands.AddCommand("Capabilities", false, "show caps", "show caps", - "Shows all registered capabilities", CapabilitiesCommand); + "Shows all registered capabilities", HandleShowCapsCommand); } public void RegionLoaded(Scene scene) @@ -227,21 +230,23 @@ namespace OpenSim.Region.CoreModules.Framework } } - private void CapabilitiesCommand(string module, string[] cmdparams) + private void HandleShowCapsCommand(string module, string[] cmdparams) { - System.Text.StringBuilder caps = new System.Text.StringBuilder(); + StringBuilder caps = new StringBuilder(); caps.AppendFormat("Region {0}:\n", m_scene.RegionInfo.RegionName); foreach (KeyValuePair kvp in m_capsObjects) { caps.AppendFormat("** User {0}:\n", kvp.Key); + for (IDictionaryEnumerator kvp2 = kvp.Value.CapsHandlers.CapsDetails.GetEnumerator(); kvp2.MoveNext(); ) { Uri uri = new Uri(kvp2.Value.ToString()); - caps.AppendFormat(" {0} = {1}\n", kvp2.Key, uri.PathAndQuery); + caps.AppendFormat(m_showCapsCommandFormat, kvp2.Key, uri.PathAndQuery); } + foreach (KeyValuePair kvp3 in kvp.Value.ExternalCapsHandlers) - caps.AppendFormat(" {0} = {1}\n", kvp3.Key, kvp3.Value); + caps.AppendFormat(m_showCapsCommandFormat, kvp3.Key, kvp3.Value); } MainConsole.Instance.Output(caps.ToString()); -- cgit v1.1 From 658d02b5e913bfa21b496515943f90ab25b6dac5 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 29 Nov 2011 16:56:31 +0000 Subject: Improve some of the debug help messages --- OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/CoreModules') diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs index f416f06..7760382 100644 --- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs @@ -218,9 +218,8 @@ namespace OpenSim.Region.CoreModules.World.Permissions m_scene.AddCommand(this, "debug permissions", "debug permissions ", - "Enable permissions debugging", - HandleDebugPermissions); - + "Turn on permissions debugging", + HandleDebugPermissions); string grant = myConfig.GetString("GrantLSL",""); if (grant.Length > 0) { -- cgit v1.1 From fa63054c4f5cf970922c2fef386b084272c5491c Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 29 Nov 2011 20:37:03 +0000 Subject: On "show caps", stop excluding the seed cap but do exclude it elsewhere --- OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/CoreModules') diff --git a/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs b/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs index 780411f..9d1538f 100644 --- a/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs +++ b/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs @@ -239,7 +239,7 @@ namespace OpenSim.Region.CoreModules.Framework { caps.AppendFormat("** User {0}:\n", kvp.Key); - for (IDictionaryEnumerator kvp2 = kvp.Value.CapsHandlers.CapsDetails.GetEnumerator(); kvp2.MoveNext(); ) + for (IDictionaryEnumerator kvp2 = kvp.Value.CapsHandlers.GetCapsDetails(false).GetEnumerator(); kvp2.MoveNext(); ) { Uri uri = new Uri(kvp2.Value.ToString()); caps.AppendFormat(m_showCapsCommandFormat, kvp2.Key, uri.PathAndQuery); -- cgit v1.1