diff options
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index aa6e505..a62a7b4 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -6867,6 +6867,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6867 | } | 6867 | } |
6868 | 6868 | ||
6869 | // copy the first script found with this inventory name | 6869 | // copy the first script found with this inventory name |
6870 | TaskInventoryItem scriptItem = null; | ||
6870 | m_host.TaskInventory.LockItemsForRead(true); | 6871 | m_host.TaskInventory.LockItemsForRead(true); |
6871 | foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory) | 6872 | foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory) |
6872 | { | 6873 | { |
@@ -6877,6 +6878,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6877 | { | 6878 | { |
6878 | found = true; | 6879 | found = true; |
6879 | srcId = inv.Key; | 6880 | srcId = inv.Key; |
6881 | scriptItem = inv.Value; | ||
6880 | break; | 6882 | break; |
6881 | } | 6883 | } |
6882 | } | 6884 | } |
@@ -6889,8 +6891,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6889 | return; | 6891 | return; |
6890 | } | 6892 | } |
6891 | 6893 | ||
6892 | // the rest of the permission checks are done in RezScript, so check the pin there as well | 6894 | SceneObjectPart dest = World.GetSceneObjectPart(destId); |
6893 | World.RezScript(srcId, m_host, destId, pin, running, start_param); | 6895 | if (dest != null) |
6896 | { | ||
6897 | if ((scriptItem.BasePermissions & (uint)PermissionMask.Transfer) != 0 || dest.ParentGroup.RootPart.OwnerID == m_host.ParentGroup.RootPart.OwnerID) | ||
6898 | { | ||
6899 | // the rest of the permission checks are done in RezScript, so check the pin there as well | ||
6900 | World.RezScript(srcId, m_host, destId, pin, running, start_param); | ||
6901 | |||
6902 | if ((scriptItem.BasePermissions & (uint)PermissionMask.Copy) == 0) | ||
6903 | m_host.Inventory.RemoveInventoryItem(srcId); | ||
6904 | } | ||
6905 | } | ||
6894 | // this will cause the delay even if the script pin or permissions were wrong - seems ok | 6906 | // this will cause the delay even if the script pin or permissions were wrong - seems ok |
6895 | ScriptSleep(3000); | 6907 | ScriptSleep(3000); |
6896 | } | 6908 | } |