diff options
author | Melanie Thielker | 2008-12-01 03:32:48 +0000 |
---|---|---|
committer | Melanie Thielker | 2008-12-01 03:32:48 +0000 |
commit | ddf765f840afd1361c756b196b256cb09fc3ee84 (patch) | |
tree | 98416351cc98e2bc7c21d7ce9c0771f01c68efe0 /OpenSim | |
parent | Remove duplicated avatar height calculation in lsl functions. (diff) | |
download | opensim-SC_OLD-ddf765f840afd1361c756b196b256cb09fc3ee84.zip opensim-SC_OLD-ddf765f840afd1361c756b196b256cb09fc3ee84.tar.gz opensim-SC_OLD-ddf765f840afd1361c756b196b256cb09fc3ee84.tar.bz2 opensim-SC_OLD-ddf765f840afd1361c756b196b256cb09fc3ee84.tar.xz |
Make the permissions module hook CanResetScript suitable for use
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs | 2 | ||||
-rw-r--r-- | 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 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 | |||
337 | if (part == null) | 337 | if (part == null) |
338 | return; | 338 | return; |
339 | 339 | ||
340 | if (Permissions.CanResetScript(itemID, remoteClient.AgentId)) | 340 | if (Permissions.CanResetScript(objectID, itemID, remoteClient.AgentId)) |
341 | { | 341 | { |
342 | EventManager.TriggerScriptReset(part.LocalId, itemID); | 342 | EventManager.TriggerScriptReset(part.LocalId, itemID); |
343 | } | 343 | } |
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 | |||
727 | #endregion | 727 | #endregion |
728 | 728 | ||
729 | #region RESET SCRIPT | 729 | #region RESET SCRIPT |
730 | public delegate bool CanResetScriptHandler(UUID script, UUID user, Scene scene); | 730 | public delegate bool CanResetScriptHandler(UUID prim, UUID script, UUID user, Scene scene); |
731 | private List<CanResetScriptHandler> CanResetScriptCheckFunctions = new List<CanResetScriptHandler>(); | 731 | private List<CanResetScriptHandler> CanResetScriptCheckFunctions = new List<CanResetScriptHandler>(); |
732 | 732 | ||
733 | public void AddResetScriptHandler(CanResetScriptHandler delegateFunc) | 733 | public void AddResetScriptHandler(CanResetScriptHandler delegateFunc) |
@@ -742,11 +742,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
742 | CanResetScriptCheckFunctions.Remove(delegateFunc); | 742 | CanResetScriptCheckFunctions.Remove(delegateFunc); |
743 | } | 743 | } |
744 | 744 | ||
745 | public bool CanResetScript(UUID script, UUID user) | 745 | public bool CanResetScript(UUID prim, UUID script, UUID user) |
746 | { | 746 | { |
747 | foreach (CanResetScriptHandler check in CanResetScriptCheckFunctions) | 747 | foreach (CanResetScriptHandler check in CanResetScriptCheckFunctions) |
748 | { | 748 | { |
749 | if (check(script, user, m_scene) == false) | 749 | if (check(prim, script, user, m_scene) == false) |
750 | { | 750 | { |
751 | return false; | 751 | return false; |
752 | } | 752 | } |