Implement ForceOwnerPermissive and God TakeCopy

0.6.0-stable
Melanie Thielker 2008-10-06 07:21:13 +00:00
parent 8887bde499
commit c65b10caa2
3 changed files with 23 additions and 0 deletions

View File

@ -1515,6 +1515,12 @@ namespace OpenSim.Region.Environment.Scenes
permissionToTake = ExternalChecks.ExternalChecksCanTakeCopyObject(((SceneObjectGroup)selectedEnt).UUID, remoteClient.AgentId);
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
{

View File

@ -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)

View File

@ -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;