From 8b3da1bff4344d4dc7738f97e5aaa6d024db8f7e Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Wed, 1 Feb 2012 00:10:07 +0000
Subject: Make script console commands only show for selected region.
---
OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
index c9fb722..459821b 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
@@ -324,6 +324,9 @@ namespace OpenSim.Region.ScriptEngine.XEngine
/// true if we're okay to proceed, false if not.
private void HandleScriptsAction(string[] cmdparams, Action action)
{
+ if (!(MainConsole.Instance.ConsoleScene == null || MainConsole.Instance.ConsoleScene == m_Scene))
+ return;
+
lock (m_Scripts)
{
string rawItemId;
@@ -367,6 +370,9 @@ namespace OpenSim.Region.ScriptEngine.XEngine
private void HandleShowStatus(string module, string[] cmdparams)
{
+ if (!(MainConsole.Instance.ConsoleScene == null || MainConsole.Instance.ConsoleScene == m_Scene))
+ return;
+
StringBuilder sb = new StringBuilder();
sb.AppendFormat("Status of XEngine instance for {0}\n", m_Scene.RegionInfo.RegionName);
@@ -385,6 +391,9 @@ namespace OpenSim.Region.ScriptEngine.XEngine
public void HandleShowScripts(string module, string[] cmdparams)
{
+ if (!(MainConsole.Instance.ConsoleScene == null || MainConsole.Instance.ConsoleScene == m_Scene))
+ return;
+
if (cmdparams.Length == 2)
{
lock (m_Scripts)
--
cgit v1.1