aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs37
1 files changed, 30 insertions, 7 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
index a9dc9cf..8c5737c 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
@@ -484,7 +484,7 @@ namespace OpenSim.Region.Environment.Scenes
484 /// Serialize all the metadata for the items in this prim's inventory ready for sending to the client 484 /// Serialize all the metadata for the items in this prim's inventory ready for sending to the client
485 /// </summary> 485 /// </summary>
486 /// <param name="xferManager"></param> 486 /// <param name="xferManager"></param>
487 public void RequestInventoryFile(IXfer xferManager) 487 public void RequestInventoryFile(IClientAPI client, IXfer xferManager)
488 { 488 {
489 byte[] fileData = new byte[0]; 489 byte[] fileData = new byte[0];
490 490
@@ -497,23 +497,45 @@ namespace OpenSim.Region.Environment.Scenes
497 { 497 {
498 foreach (TaskInventoryItem item in m_taskInventory.Values) 498 foreach (TaskInventoryItem item in m_taskInventory.Values)
499 { 499 {
500 LLUUID ownerID=item.OwnerID;
501 uint everyoneMask=0;
502 uint baseMask=item.BaseMask;
503 uint ownerMask=item.OwnerMask;
504
505 if(item.InvType == 10) // Script
506 {
507 if((item.OwnerID != client.AgentId) && m_parentGroup.Scene.ExternalChecks.ExternalChecksCanViewScript(item.ItemID, UUID, client.AgentId))
508 {
509 ownerID=client.AgentId;
510 baseMask=0x7fffffff;
511 ownerMask=0x7fffffff;
512 everyoneMask=(uint)(PermissionMask.Move | PermissionMask.Transfer);
513 }
514 if((item.OwnerID != client.AgentId) && m_parentGroup.Scene.ExternalChecks.ExternalChecksCanEditScript(item.ItemID, UUID, client.AgentId))
515 {
516 ownerID=client.AgentId;
517 baseMask=0x7fffffff;
518 ownerMask=0x7fffffff;
519 everyoneMask=(uint)(PermissionMask.Move | PermissionMask.Transfer | PermissionMask.Modify);
520 }
521 }
522
500 invString.AddItemStart(); 523 invString.AddItemStart();
501 invString.AddNameValueLine("item_id", item.ItemID.ToString()); 524 invString.AddNameValueLine("item_id", item.ItemID.ToString());
502 invString.AddNameValueLine("parent_id", UUID.ToString()); 525 invString.AddNameValueLine("parent_id", UUID.ToString());
503 526
504 invString.AddPermissionsStart(); 527 invString.AddPermissionsStart();
505 528
506 invString.AddNameValueLine("base_mask", Helpers.UIntToHexString(item.BaseMask)); 529 invString.AddNameValueLine("base_mask", Helpers.UIntToHexString(baseMask));
507 invString.AddNameValueLine("owner_mask", Helpers.UIntToHexString(item.OwnerMask)); 530 invString.AddNameValueLine("owner_mask", Helpers.UIntToHexString(ownerMask));
508 invString.AddNameValueLine("group_mask", "00000000"); 531 invString.AddNameValueLine("group_mask", Helpers.UIntToHexString(0));
509 invString.AddNameValueLine("everyone_mask", "00000000"); 532 invString.AddNameValueLine("everyone_mask", Helpers.UIntToHexString(everyoneMask));
510 invString.AddNameValueLine("next_owner_mask", Helpers.UIntToHexString(item.NextOwnerMask)); 533 invString.AddNameValueLine("next_owner_mask", Helpers.UIntToHexString(item.NextOwnerMask));
511 534
512 invString.AddNameValueLine("creator_id", item.CreatorID.ToString()); 535 invString.AddNameValueLine("creator_id", item.CreatorID.ToString());
513 invString.AddNameValueLine("owner_id", item.OwnerID.ToString()); 536 invString.AddNameValueLine("owner_id", ownerID.ToString());
514 537
515 invString.AddNameValueLine("last_owner_id", item.LastOwnerID.ToString()); 538 invString.AddNameValueLine("last_owner_id", item.LastOwnerID.ToString());
516// invString.AddNameValueLine("last_owner_id", item.OwnerID.ToString());
517 539
518 invString.AddNameValueLine("group_id", item.GroupID.ToString()); 540 invString.AddNameValueLine("group_id", item.GroupID.ToString());
519 invString.AddSectionEnd(); 541 invString.AddSectionEnd();
@@ -538,6 +560,7 @@ namespace OpenSim.Region.Environment.Scenes
538 560
539 fileData = Helpers.StringToField(invString.BuildString); 561 fileData = Helpers.StringToField(invString.BuildString);
540 562
563 //Console.WriteLine(Helpers.FieldToUTF8String(fileData));
541 //m_log.Debug("[PRIM INVENTORY]: RequestInventoryFile fileData: " + Helpers.FieldToUTF8String(fileData)); 564 //m_log.Debug("[PRIM INVENTORY]: RequestInventoryFile fileData: " + Helpers.FieldToUTF8String(fileData));
542 565
543 if (fileData.Length > 2) 566 if (fileData.Length > 2)