aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorMelanie2011-10-25 02:57:01 +0100
committerMelanie2011-10-25 02:57:01 +0100
commit89e973805d30619b2309c538c205734af4907f1a (patch)
tree4bab60f7bcf03ee0b0c2f29ab71e7654ffdaff58 /OpenSim/Region
parentMerge commit 'd9184eceab5ff9087801b0f0d447dec2f5227a50' into bigmerge (diff)
parentAdd "show scripts" command to show all scripts currently known to the script ... (diff)
downloadopensim-SC-89e973805d30619b2309c538c205734af4907f1a.zip
opensim-SC-89e973805d30619b2309c538c205734af4907f1a.tar.gz
opensim-SC-89e973805d30619b2309c538c205734af4907f1a.tar.bz2
opensim-SC-89e973805d30619b2309c538c205734af4907f1a.tar.xz
Merge commit 'ecad9f9fd589f90d1c7a20faf14af0304804b616' into bigmerge
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/XEngine.cs28
2 files changed, 28 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 012f7e1..0e0c2b7 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -2675,10 +2675,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2675 /// indices, and the tolerance for out-of-bound values, makes 2675 /// indices, and the tolerance for out-of-bound values, makes
2676 /// this more complicated than it might otherwise seem. 2676 /// this more complicated than it might otherwise seem.
2677 /// </summary> 2677 /// </summary>
2678
2679 public LSL_String llGetSubString(string src, int start, int end) 2678 public LSL_String llGetSubString(string src, int start, int end)
2680 { 2679 {
2681
2682 m_host.AddScriptLPS(1); 2680 m_host.AddScriptLPS(1);
2683 2681
2684 // Normalize indices (if negative). 2682 // Normalize indices (if negative).
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;
42using Nini.Config; 42using Nini.Config;
43using Amib.Threading; 43using Amib.Threading;
44using OpenSim.Framework; 44using OpenSim.Framework;
45using OpenSim.Framework.Console;
45using OpenSim.Region.Framework.Scenes; 46using OpenSim.Region.Framework.Scenes;
46using OpenSim.Region.Framework.Interfaces; 47using OpenSim.Region.Framework.Interfaces;
47using OpenSim.Region.ScriptEngine.Shared; 48using 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)