From c65b10caa2a877096d52d29e7b89026e9f54d622 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Mon, 6 Oct 2008 07:21:13 +0000 Subject: Implement ForceOwnerPermissive and God TakeCopy --- OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | 6 ++++++ OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs | 9 +++++++++ OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | 8 ++++++++ 3 files changed, 23 insertions(+) diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs index ecc6180..204ba39 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs @@ -1516,6 +1516,12 @@ namespace OpenSim.Region.Environment.Scenes permissionToDelete = false; //Just taking copy! } + else if (DeRezPacket.AgentBlock.Destination == 5) //God take copy + { + permissionToTake = ExternalChecks.ExternalChecksCanBeGodLike(remoteClient.AgentId); + permissionToDelete = false; //Just taking copy! + + } else if (DeRezPacket.AgentBlock.Destination == 4) //Take { // Take diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs index 5b57e73..34e5305 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs @@ -733,6 +733,15 @@ namespace OpenSim.Region.Environment.Scenes TriggerScriptChangedEvent(Changed.OWNER); } + public void ApplyGodPermissions(uint perms) + { + foreach (TaskInventoryItem item in m_taskInventory.Values) + { + item.CurrentPermissions = perms; + item.BasePermissions = perms; + } + } + public bool ContainsScripts() { foreach (TaskInventoryItem item in m_taskInventory.Values) diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index 91249f9..f4ada1a 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs @@ -3037,6 +3037,14 @@ namespace OpenSim.Region.Environment.Scenes { switch (field) { + case 1: + if (god) + { + _baseMask = ApplyMask(_baseMask, set, mask); + ApplyGodPermissions(_baseMask); + } + + break; case 2: _ownerMask = ApplyMask(_ownerMask, set, mask) & baseMask; -- cgit v1.1