diff options
author | Diva Canto | 2011-02-05 19:21:12 -0800 |
---|---|---|
committer | Diva Canto | 2011-02-05 19:21:12 -0800 |
commit | 30fa5ad1e29df50de99611b43adfd577696bfdda (patch) | |
tree | 7f9ae4a0d0a807e68b3483a9f82c4c21044e2404 /OpenSim/Region/CoreModules/Agent/Capabilities | |
parent | Added a couple of console commands to help diagnose issues: (diff) | |
download | opensim-SC_OLD-30fa5ad1e29df50de99611b43adfd577696bfdda.zip opensim-SC_OLD-30fa5ad1e29df50de99611b43adfd577696bfdda.tar.gz opensim-SC_OLD-30fa5ad1e29df50de99611b43adfd577696bfdda.tar.bz2 opensim-SC_OLD-30fa5ad1e29df50de99611b43adfd577696bfdda.tar.xz |
One more diagnosis command:
show caps
Diffstat (limited to 'OpenSim/Region/CoreModules/Agent/Capabilities')
-rw-r--r-- | OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs b/OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs index c023a6f..75df6cc 100644 --- a/OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs +++ b/OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs | |||
@@ -26,12 +26,14 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Collections; | ||
29 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
30 | using System.Reflection; | 31 | using System.Reflection; |
31 | using log4net; | 32 | using log4net; |
32 | using Nini.Config; | 33 | using Nini.Config; |
33 | using OpenMetaverse; | 34 | using OpenMetaverse; |
34 | using OpenSim.Framework; | 35 | using OpenSim.Framework; |
36 | using OpenSim.Framework.Console; | ||
35 | using OpenSim.Region.Framework.Interfaces; | 37 | using OpenSim.Region.Framework.Interfaces; |
36 | using OpenSim.Region.Framework.Scenes; | 38 | using OpenSim.Region.Framework.Scenes; |
37 | using Caps=OpenSim.Framework.Capabilities.Caps; | 39 | using Caps=OpenSim.Framework.Capabilities.Caps; |
@@ -61,6 +63,10 @@ namespace OpenSim.Region.CoreModules.Agent.Capabilities | |||
61 | { | 63 | { |
62 | m_scene = scene; | 64 | m_scene = scene; |
63 | m_scene.RegisterModuleInterface<ICapabilitiesModule>(this); | 65 | m_scene.RegisterModuleInterface<ICapabilitiesModule>(this); |
66 | MainConsole.Instance.Commands.AddCommand("Capabilities", false, "show caps", | ||
67 | "show capabilities", | ||
68 | "Shows all registered capabilities", CapabilitiesCommand); | ||
69 | m_log.Error("\n\n**************************************************************\n\n"); | ||
64 | } | 70 | } |
65 | 71 | ||
66 | public void RegionLoaded(Scene scene) | 72 | public void RegionLoaded(Scene scene) |
@@ -72,7 +78,9 @@ namespace OpenSim.Region.CoreModules.Agent.Capabilities | |||
72 | m_scene.UnregisterModuleInterface<ICapabilitiesModule>(this); | 78 | m_scene.UnregisterModuleInterface<ICapabilitiesModule>(this); |
73 | } | 79 | } |
74 | 80 | ||
75 | public void PostInitialise() {} | 81 | public void PostInitialise() |
82 | { | ||
83 | } | ||
76 | 84 | ||
77 | public void Close() {} | 85 | public void Close() {} |
78 | 86 | ||
@@ -226,5 +234,23 @@ namespace OpenSim.Region.CoreModules.Agent.Capabilities | |||
226 | m_log.Info(" >> "+x+", "+y+": "+kvp.Value); | 234 | m_log.Info(" >> "+x+", "+y+": "+kvp.Value); |
227 | } | 235 | } |
228 | } | 236 | } |
237 | |||
238 | private void CapabilitiesCommand(string module, string[] cmdparams) | ||
239 | { | ||
240 | System.Text.StringBuilder caps = new System.Text.StringBuilder(); | ||
241 | caps.AppendFormat("Region {0}:\n", m_scene.RegionInfo.RegionName); | ||
242 | |||
243 | foreach (KeyValuePair<UUID, Caps> kvp in m_capsHandlers) | ||
244 | { | ||
245 | caps.AppendFormat("** User {0}:\n", kvp.Key); | ||
246 | for (IDictionaryEnumerator kvp2 = kvp.Value.CapsHandlers.CapsDetails.GetEnumerator(); kvp2.MoveNext(); ) | ||
247 | { | ||
248 | Uri uri = new Uri(kvp2.Value.ToString()); | ||
249 | caps.AppendFormat(" {0} = {1}\n", kvp2.Key, uri.PathAndQuery); | ||
250 | } | ||
251 | } | ||
252 | |||
253 | MainConsole.Instance.Output(caps.ToString()); | ||
254 | } | ||
229 | } | 255 | } |
230 | } | 256 | } |