Add "show scripts" command to show all scripts currently known to the script engine in the current region.
Also added synonym of "scripts show"0.7.2-post-fixes
parent
8a2c3a0267
commit
1a29ddf328
|
@ -2446,10 +2446,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
/// indices, and the tolerance for out-of-bound values, makes
|
/// indices, and the tolerance for out-of-bound values, makes
|
||||||
/// this more complicated than it might otherwise seem.
|
/// this more complicated than it might otherwise seem.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
||||||
public LSL_String llGetSubString(string src, int start, int end)
|
public LSL_String llGetSubString(string src, int start, int end)
|
||||||
{
|
{
|
||||||
|
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
|
|
||||||
// Normalize indices (if negative).
|
// Normalize indices (if negative).
|
||||||
|
|
|
@ -41,6 +41,7 @@ using log4net;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using Amib.Threading;
|
using Amib.Threading;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
|
using OpenSim.Framework.Console;
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenSim.Region.ScriptEngine.Shared;
|
using OpenSim.Region.ScriptEngine.Shared;
|
||||||
|
@ -265,6 +266,33 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
||||||
OnScriptRemoved += m_XmlRpcRouter.ScriptRemoved;
|
OnScriptRemoved += m_XmlRpcRouter.ScriptRemoved;
|
||||||
OnObjectRemoved += m_XmlRpcRouter.ObjectRemoved;
|
OnObjectRemoved += m_XmlRpcRouter.ObjectRemoved;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MainConsole.Instance.Commands.AddCommand(
|
||||||
|
"scripts", false, "scripts show", "scripts show", "Show script information",
|
||||||
|
"Show information on all scripts known to the script engine", HandleShowScripts);
|
||||||
|
|
||||||
|
MainConsole.Instance.Commands.AddCommand(
|
||||||
|
"scripts", false, "show scripts", "show scripts", "Show script information",
|
||||||
|
"Synonym for scripts show command", HandleShowScripts);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void HandleShowScripts(string module, string[] cmdparams)
|
||||||
|
{
|
||||||
|
lock (m_Scripts)
|
||||||
|
{
|
||||||
|
MainConsole.Instance.OutputFormat(
|
||||||
|
"Showing {0} scripts in {1}", m_Scripts.Count, m_Scene.RegionInfo.RegionName);
|
||||||
|
|
||||||
|
foreach (IScriptInstance instance in m_Scripts.Values)
|
||||||
|
{
|
||||||
|
SceneObjectPart sop = m_Scene.GetSceneObjectPart(instance.ObjectID);
|
||||||
|
|
||||||
|
MainConsole.Instance.OutputFormat(
|
||||||
|
"{0}.{1}, script UUID {2}, prim UUID {3} @ {4}",
|
||||||
|
instance.PrimName, instance.ScriptName, instance.AssetID, instance.ObjectID,
|
||||||
|
sop.AbsolutePosition, m_Scene.RegionInfo.RegionName);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RemoveRegion(Scene scene)
|
public void RemoveRegion(Scene scene)
|
||||||
|
|
Loading…
Reference in New Issue