diff options
author | Melanie | 2011-12-01 12:16:59 +0000 |
---|---|---|
committer | Melanie | 2011-12-01 12:16:59 +0000 |
commit | b60ff651a3912f7d7830cac40752218efba858d8 (patch) | |
tree | ba22de2341b996cfeb1f7da31f650e206cb1d76f /OpenSim/Region/CoreModules/Framework/Caps | |
parent | Merge branch 'master' into bigmerge (diff) | |
parent | Provide more user feedback when "debug http" is set (diff) | |
download | opensim-SC_OLD-b60ff651a3912f7d7830cac40752218efba858d8.zip opensim-SC_OLD-b60ff651a3912f7d7830cac40752218efba858d8.tar.gz opensim-SC_OLD-b60ff651a3912f7d7830cac40752218efba858d8.tar.bz2 opensim-SC_OLD-b60ff651a3912f7d7830cac40752218efba858d8.tar.xz |
Merge branch 'master' into bigmerge
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework/Caps')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs b/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs index babeaab..97cd738 100644 --- a/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs +++ b/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs | |||
@@ -29,6 +29,7 @@ using System; | |||
29 | using System.Collections; | 29 | using System.Collections; |
30 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
31 | using System.Reflection; | 31 | using System.Reflection; |
32 | using System.Text; | ||
32 | using log4net; | 33 | using log4net; |
33 | using Nini.Config; | 34 | using Nini.Config; |
34 | using Mono.Addins; | 35 | using Mono.Addins; |
@@ -46,6 +47,8 @@ namespace OpenSim.Region.CoreModules.Framework | |||
46 | public class CapabilitiesModule : INonSharedRegionModule, ICapabilitiesModule | 47 | public class CapabilitiesModule : INonSharedRegionModule, ICapabilitiesModule |
47 | { | 48 | { |
48 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 49 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
50 | |||
51 | private string m_showCapsCommandFormat = " {0,-38} {1,-60}\n"; | ||
49 | 52 | ||
50 | protected Scene m_scene; | 53 | protected Scene m_scene; |
51 | 54 | ||
@@ -68,7 +71,7 @@ namespace OpenSim.Region.CoreModules.Framework | |||
68 | m_scene.RegisterModuleInterface<ICapabilitiesModule>(this); | 71 | m_scene.RegisterModuleInterface<ICapabilitiesModule>(this); |
69 | MainConsole.Instance.Commands.AddCommand("Capabilities", false, "show caps", | 72 | MainConsole.Instance.Commands.AddCommand("Capabilities", false, "show caps", |
70 | "show caps", | 73 | "show caps", |
71 | "Shows all registered capabilities", CapabilitiesCommand); | 74 | "Shows all registered capabilities", HandleShowCapsCommand); |
72 | } | 75 | } |
73 | 76 | ||
74 | public void RegionLoaded(Scene scene) | 77 | public void RegionLoaded(Scene scene) |
@@ -228,21 +231,23 @@ namespace OpenSim.Region.CoreModules.Framework | |||
228 | } | 231 | } |
229 | } | 232 | } |
230 | 233 | ||
231 | private void CapabilitiesCommand(string module, string[] cmdparams) | 234 | private void HandleShowCapsCommand(string module, string[] cmdparams) |
232 | { | 235 | { |
233 | System.Text.StringBuilder caps = new System.Text.StringBuilder(); | 236 | StringBuilder caps = new StringBuilder(); |
234 | caps.AppendFormat("Region {0}:\n", m_scene.RegionInfo.RegionName); | 237 | caps.AppendFormat("Region {0}:\n", m_scene.RegionInfo.RegionName); |
235 | 238 | ||
236 | foreach (KeyValuePair<UUID, Caps> kvp in m_capsObjects) | 239 | foreach (KeyValuePair<UUID, Caps> kvp in m_capsObjects) |
237 | { | 240 | { |
238 | caps.AppendFormat("** User {0}:\n", kvp.Key); | 241 | caps.AppendFormat("** User {0}:\n", kvp.Key); |
239 | for (IDictionaryEnumerator kvp2 = kvp.Value.CapsHandlers.CapsDetails.GetEnumerator(); kvp2.MoveNext(); ) | 242 | |
243 | for (IDictionaryEnumerator kvp2 = kvp.Value.CapsHandlers.GetCapsDetails(false).GetEnumerator(); kvp2.MoveNext(); ) | ||
240 | { | 244 | { |
241 | Uri uri = new Uri(kvp2.Value.ToString()); | 245 | Uri uri = new Uri(kvp2.Value.ToString()); |
242 | caps.AppendFormat(" {0} = {1}\n", kvp2.Key, uri.PathAndQuery); | 246 | caps.AppendFormat(m_showCapsCommandFormat, kvp2.Key, uri.PathAndQuery); |
243 | } | 247 | } |
248 | |||
244 | foreach (KeyValuePair<string, string> kvp3 in kvp.Value.ExternalCapsHandlers) | 249 | foreach (KeyValuePair<string, string> kvp3 in kvp.Value.ExternalCapsHandlers) |
245 | caps.AppendFormat(" {0} = {1}\n", kvp3.Key, kvp3.Value); | 250 | caps.AppendFormat(m_showCapsCommandFormat, kvp3.Key, kvp3.Value); |
246 | } | 251 | } |
247 | 252 | ||
248 | MainConsole.Instance.Output(caps.ToString()); | 253 | MainConsole.Instance.Output(caps.ToString()); |