From ddf765f840afd1361c756b196b256cb09fc3ee84 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Mon, 1 Dec 2008 03:32:48 +0000 Subject: [PATCH] Make the permissions module hook CanResetScript suitable for use --- OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs | 2 +- OpenSim/Region/Environment/Scenes/Scene.Permissions.cs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs index 97846cf303..2bd1f1c4dc 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs @@ -337,7 +337,7 @@ namespace OpenSim.Region.Environment.Scenes if (part == null) return; - if (Permissions.CanResetScript(itemID, remoteClient.AgentId)) + if (Permissions.CanResetScript(objectID, itemID, remoteClient.AgentId)) { EventManager.TriggerScriptReset(part.LocalId, itemID); } diff --git a/OpenSim/Region/Environment/Scenes/Scene.Permissions.cs b/OpenSim/Region/Environment/Scenes/Scene.Permissions.cs index 5f3b100c42..08721284c7 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.Permissions.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.Permissions.cs @@ -727,7 +727,7 @@ namespace OpenSim.Region.Environment.Scenes #endregion #region RESET SCRIPT - public delegate bool CanResetScriptHandler(UUID script, UUID user, Scene scene); + public delegate bool CanResetScriptHandler(UUID prim, UUID script, UUID user, Scene scene); private List CanResetScriptCheckFunctions = new List(); public void AddResetScriptHandler(CanResetScriptHandler delegateFunc) @@ -742,11 +742,11 @@ namespace OpenSim.Region.Environment.Scenes CanResetScriptCheckFunctions.Remove(delegateFunc); } - public bool CanResetScript(UUID script, UUID user) + public bool CanResetScript(UUID prim, UUID script, UUID user) { foreach (CanResetScriptHandler check in CanResetScriptCheckFunctions) { - if (check(script, user, m_scene) == false) + if (check(prim, script, user, m_scene) == false) { return false; }