aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-10-19 20:09:02 +0100
committerJustin Clark-Casey (justincc)2011-10-19 20:09:02 +0100
commitecad9f9fd589f90d1c7a20faf14af0304804b616 (patch)
tree167803ddca5de43a6c957c46231d30beb1ac4665
parentAdd option to allow remote http calls to setpassword in the AuthenticationSer... (diff)
downloadopensim-SC_OLD-ecad9f9fd589f90d1c7a20faf14af0304804b616.zip
opensim-SC_OLD-ecad9f9fd589f90d1c7a20faf14af0304804b616.tar.gz
opensim-SC_OLD-ecad9f9fd589f90d1c7a20faf14af0304804b616.tar.bz2
opensim-SC_OLD-ecad9f9fd589f90d1c7a20faf14af0304804b616.tar.xz
Add "show scripts" command to show all scripts currently known to the script engine in the current region.
Also added synonym of "scripts show"
-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 54bb62f..b8e9878 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -2446,10 +2446,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2446 /// indices, and the tolerance for out-of-bound values, makes 2446 /// indices, and the tolerance for out-of-bound values, makes
2447 /// this more complicated than it might otherwise seem. 2447 /// this more complicated than it might otherwise seem.
2448 /// </summary> 2448 /// </summary>
2449
2450 public LSL_String llGetSubString(string src, int start, int end) 2449 public LSL_String llGetSubString(string src, int start, int end)
2451 { 2450 {
2452
2453 m_host.AddScriptLPS(1); 2451 m_host.AddScriptLPS(1);
2454 2452
2455 // Normalize indices (if negative). 2453 // Normalize indices (if negative).
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)