aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Agent/Capabilities
diff options
context:
space:
mode:
authorBlueWall2011-02-12 20:42:11 -0500
committerBlueWall2011-02-12 20:42:11 -0500
commitc0e1742d479d4390701688da685892555f28bfbc (patch)
tree39d717dd9ce4c453898eca2237f9fc2d2879c1d4 /OpenSim/Region/CoreModules/Agent/Capabilities
parentMerge branch 'master' of /home/opensim/src/OpenSim/Core (diff)
parentFixed a couple of tests in the HttpServer. Not sure if this is enough. Mantis... (diff)
downloadopensim-SC_OLD-c0e1742d479d4390701688da685892555f28bfbc.zip
opensim-SC_OLD-c0e1742d479d4390701688da685892555f28bfbc.tar.gz
opensim-SC_OLD-c0e1742d479d4390701688da685892555f28bfbc.tar.bz2
opensim-SC_OLD-c0e1742d479d4390701688da685892555f28bfbc.tar.xz
Merge branch 'master' of /home/opensim/src/OpenSim/Core
Diffstat (limited to 'OpenSim/Region/CoreModules/Agent/Capabilities')
-rw-r--r--OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs27
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 c023a6f..1d8e70e 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
28using System; 28using System;
29using System.Collections;
29using System.Collections.Generic; 30using System.Collections.Generic;
30using System.Reflection; 31using System.Reflection;
31using log4net; 32using log4net;
32using Nini.Config; 33using Nini.Config;
33using OpenMetaverse; 34using OpenMetaverse;
34using OpenSim.Framework; 35using OpenSim.Framework;
36using OpenSim.Framework.Console;
35using OpenSim.Region.Framework.Interfaces; 37using OpenSim.Region.Framework.Interfaces;
36using OpenSim.Region.Framework.Scenes; 38using OpenSim.Region.Framework.Scenes;
37using Caps=OpenSim.Framework.Capabilities.Caps; 39using 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
@@ -226,5 +233,23 @@ namespace OpenSim.Region.CoreModules.Agent.Capabilities
226 m_log.Info(" >> "+x+", "+y+": "+kvp.Value); 233 m_log.Info(" >> "+x+", "+y+": "+kvp.Value);
227 } 234 }
228 } 235 }
236
237 private void CapabilitiesCommand(string module, string[] cmdparams)
238 {
239 System.Text.StringBuilder caps = new System.Text.StringBuilder();
240 caps.AppendFormat("Region {0}:\n", m_scene.RegionInfo.RegionName);
241
242 foreach (KeyValuePair<UUID, Caps> kvp in m_capsHandlers)
243 {
244 caps.AppendFormat("** User {0}:\n", kvp.Key);
245 for (IDictionaryEnumerator kvp2 = kvp.Value.CapsHandlers.CapsDetails.GetEnumerator(); kvp2.MoveNext(); )
246 {
247 Uri uri = new Uri(kvp2.Value.ToString());
248 caps.AppendFormat(" {0} = {1}\n", kvp2.Key, uri.PathAndQuery);
249 }
250 }
251
252 MainConsole.Instance.Output(caps.ToString());
253 }
229 } 254 }
230} 255}