aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/XEngine/XEngine.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/XEngine.cs28
1 files changed, 28 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
index 2a0ec37..9f8ee1c 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
@@ -41,6 +41,7 @@ using log4net;
41using Nini.Config; 41using Nini.Config;
42using Amib.Threading; 42using Amib.Threading;
43using OpenSim.Framework; 43using OpenSim.Framework;
44using OpenSim.Framework.Console;
44using OpenSim.Region.Framework.Scenes; 45using OpenSim.Region.Framework.Scenes;
45using OpenSim.Region.Framework.Interfaces; 46using OpenSim.Region.Framework.Interfaces;
46using OpenSim.Region.ScriptEngine.Shared; 47using OpenSim.Region.ScriptEngine.Shared;
@@ -265,6 +266,33 @@ namespace OpenSim.Region.ScriptEngine.XEngine
265 OnScriptRemoved += m_XmlRpcRouter.ScriptRemoved; 266 OnScriptRemoved += m_XmlRpcRouter.ScriptRemoved;
266 OnObjectRemoved += m_XmlRpcRouter.ObjectRemoved; 267 OnObjectRemoved += m_XmlRpcRouter.ObjectRemoved;
267 } 268 }
269
270 MainConsole.Instance.Commands.AddCommand(
271 "scripts", false, "scripts show", "scripts show", "Show script information",
272 "Show information on all scripts known to the script engine", HandleShowScripts);
273
274 MainConsole.Instance.Commands.AddCommand(
275 "scripts", false, "show scripts", "show scripts", "Show script information",
276 "Synonym for scripts show command", HandleShowScripts);
277 }
278
279 public void HandleShowScripts(string module, string[] cmdparams)
280 {
281 lock (m_Scripts)
282 {
283 MainConsole.Instance.OutputFormat(
284 "Showing {0} scripts in {1}", m_Scripts.Count, m_Scene.RegionInfo.RegionName);
285
286 foreach (IScriptInstance instance in m_Scripts.Values)
287 {
288 SceneObjectPart sop = m_Scene.GetSceneObjectPart(instance.ObjectID);
289
290 MainConsole.Instance.OutputFormat(
291 "{0}.{1}, script UUID {2}, prim UUID {3} @ {4}",
292 instance.PrimName, instance.ScriptName, instance.AssetID, instance.ObjectID,
293 sop.AbsolutePosition, m_Scene.RegionInfo.RegionName);
294 }
295 }
268 } 296 }
269 297
270 public void RemoveRegion(Scene scene) 298 public void RemoveRegion(Scene scene)