From ddf765f840afd1361c756b196b256cb09fc3ee84 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Mon, 1 Dec 2008 03:32:48 +0000 Subject: 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(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs index 97846cf..2bd1f1c 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 5f3b100..0872128 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; } -- cgit v1.1