From 01904e66f243df062440fc0ff621f349e92687db Mon Sep 17 00:00:00 2001 From: Charles Krinke Date: Tue, 8 Jul 2008 15:16:43 +0000 Subject: Mantis#1690. Thank you kindly, Melanie for a patch that: esets script permissions when a script is recompiled. --- .../Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs | 3 +++ OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | 6 ++++++ 2 files changed, 9 insertions(+) (limited to 'OpenSim/Region/ScriptEngine') diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs index 75ab2aa..99bbdee 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs @@ -432,6 +432,9 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase IScript s = GetScript(localID, itemID); string script = s.Source; StopScript(localID, itemID); + SceneObjectPart part = World.GetSceneObjectPart(localID); + part.GetInventoryItem(itemID).PermsMask = 0; + part.GetInventoryItem(itemID).PermsGranter = LLUUID.Zero; StartScript(localID, itemID, script, s.StartParam, false); } diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index 11b93b4..6372247 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs @@ -1375,6 +1375,9 @@ namespace OpenSim.Region.ScriptEngine.XEngine RemoveState(); Stop(0); + SceneObjectPart part=m_Engine.World.GetSceneObjectPart(m_LocalID); + part.GetInventoryItem(m_ItemID).PermsMask = 0; + part.GetInventoryItem(m_ItemID).PermsGranter = LLUUID.Zero; m_Engine.m_AsyncCommands.RemoveScript(m_LocalID, m_ItemID); m_EventQueue.Clear(); m_Script.ResetVars(); @@ -1392,6 +1395,9 @@ namespace OpenSim.Region.ScriptEngine.XEngine RemoveState(); m_Script.ResetVars(); + SceneObjectPart part=m_Engine.World.GetSceneObjectPart(m_LocalID); + part.GetInventoryItem(m_ItemID).PermsMask = 0; + part.GetInventoryItem(m_ItemID).PermsGranter = LLUUID.Zero; m_Engine.m_AsyncCommands.RemoveScript(m_LocalID, m_ItemID); if (m_CurrentEvent != "state_entry") { -- cgit v1.1