diff options
author | Melanie | 2011-02-07 23:07:36 +0000 |
---|---|---|
committer | Melanie | 2011-02-07 23:07:36 +0000 |
commit | 076f2ac8dbfa3dae31961ceadc41f4c0319f1fb0 (patch) | |
tree | d6d80e7364bd96b95dddfbf03b708e2ea6ba3f77 /OpenSim/Region/CoreModules/Agent | |
parent | Fix merge issues (diff) | |
parent | Hunting down mantis #5365 (diff) | |
download | opensim-SC_OLD-076f2ac8dbfa3dae31961ceadc41f4c0319f1fb0.zip opensim-SC_OLD-076f2ac8dbfa3dae31961ceadc41f4c0319f1fb0.tar.gz opensim-SC_OLD-076f2ac8dbfa3dae31961ceadc41f4c0319f1fb0.tar.bz2 opensim-SC_OLD-076f2ac8dbfa3dae31961ceadc41f4c0319f1fb0.tar.xz |
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Region/CoreModules/Agent')
-rw-r--r-- | OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs b/OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs index 5c5cb70..7526bd2 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,9 @@ 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); | ||
64 | } | 69 | } |
65 | 70 | ||
66 | public void RegionLoaded(Scene scene) | 71 | public void RegionLoaded(Scene scene) |
@@ -72,7 +77,9 @@ namespace OpenSim.Region.CoreModules.Agent.Capabilities | |||
72 | m_scene.UnregisterModuleInterface<ICapabilitiesModule>(this); | 77 | m_scene.UnregisterModuleInterface<ICapabilitiesModule>(this); |
73 | } | 78 | } |
74 | 79 | ||
75 | public void PostInitialise() {} | 80 | public void PostInitialise() |
81 | { | ||
82 | } | ||
76 | 83 | ||
77 | public void Close() {} | 84 | public void Close() {} |
78 | 85 | ||
@@ -227,5 +234,23 @@ namespace OpenSim.Region.CoreModules.Agent.Capabilities | |||
227 | m_log.Info(" >> "+x+", "+y+": "+kvp.Value); | 234 | m_log.Info(" >> "+x+", "+y+": "+kvp.Value); |
228 | } | 235 | } |
229 | } | 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 | } | ||
230 | } | 255 | } |
231 | } | 256 | } |