diff options
Merge commit 'ecad9f9fd589f90d1c7a20faf14af0304804b616' into bigmerge
Diffstat (limited to 'OpenSim/Region/ScriptEngine/XEngine')
-rw-r--r-- | OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index 32d1fd3..572ca07 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | |||
@@ -42,6 +42,7 @@ using log4net; | |||
42 | using Nini.Config; | 42 | using Nini.Config; |
43 | using Amib.Threading; | 43 | using Amib.Threading; |
44 | using OpenSim.Framework; | 44 | using OpenSim.Framework; |
45 | using OpenSim.Framework.Console; | ||
45 | using OpenSim.Region.Framework.Scenes; | 46 | using OpenSim.Region.Framework.Scenes; |
46 | using OpenSim.Region.Framework.Interfaces; | 47 | using OpenSim.Region.Framework.Interfaces; |
47 | using OpenSim.Region.ScriptEngine.Shared; | 48 | using OpenSim.Region.ScriptEngine.Shared; |
@@ -333,6 +334,33 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
333 | OnScriptRemoved += m_XmlRpcRouter.ScriptRemoved; | 334 | OnScriptRemoved += m_XmlRpcRouter.ScriptRemoved; |
334 | OnObjectRemoved += m_XmlRpcRouter.ObjectRemoved; | 335 | OnObjectRemoved += m_XmlRpcRouter.ObjectRemoved; |
335 | } | 336 | } |
337 | |||
338 | MainConsole.Instance.Commands.AddCommand( | ||
339 | "scripts", false, "scripts show", "scripts show", "Show script information", | ||
340 | "Show information on all scripts known to the script engine", HandleShowScripts); | ||
341 | |||
342 | MainConsole.Instance.Commands.AddCommand( | ||
343 | "scripts", false, "show scripts", "show scripts", "Show script information", | ||
344 | "Synonym for scripts show command", HandleShowScripts); | ||
345 | } | ||
346 | |||
347 | public void HandleShowScripts(string module, string[] cmdparams) | ||
348 | { | ||
349 | lock (m_Scripts) | ||
350 | { | ||
351 | MainConsole.Instance.OutputFormat( | ||
352 | "Showing {0} scripts in {1}", m_Scripts.Count, m_Scene.RegionInfo.RegionName); | ||
353 | |||
354 | foreach (IScriptInstance instance in m_Scripts.Values) | ||
355 | { | ||
356 | SceneObjectPart sop = m_Scene.GetSceneObjectPart(instance.ObjectID); | ||
357 | |||
358 | MainConsole.Instance.OutputFormat( | ||
359 | "{0}.{1}, script UUID {2}, prim UUID {3} @ {4}", | ||
360 | instance.PrimName, instance.ScriptName, instance.AssetID, instance.ObjectID, | ||
361 | sop.AbsolutePosition, m_Scene.RegionInfo.RegionName); | ||
362 | } | ||
363 | } | ||
336 | } | 364 | } |
337 | 365 | ||
338 | public void RemoveRegion(Scene scene) | 366 | public void RemoveRegion(Scene scene) |