aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment
diff options
context:
space:
mode:
authorTeravus Ovares2008-05-17 00:16:16 +0000
committerTeravus Ovares2008-05-17 00:16:16 +0000
commit349a17f664f661acf97896d4b778368edb822044 (patch)
tree24893ef56a12a7e758503c79cddcae3263ee2dbc /OpenSim/Region/Environment
parentFormatting cleanup. (diff)
downloadopensim-SC_OLD-349a17f664f661acf97896d4b778368edb822044.zip
opensim-SC_OLD-349a17f664f661acf97896d4b778368edb822044.tar.gz
opensim-SC_OLD-349a17f664f661acf97896d4b778368edb822044.tar.bz2
opensim-SC_OLD-349a17f664f661acf97896d4b778368edb822044.tar.xz
* Tweaked patch mantis 1302 and committing it.
Diffstat (limited to 'OpenSim/Region/Environment')
-rw-r--r--OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs17
-rw-r--r--OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs4
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.Inventory.cs2
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs4
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs37
5 files changed, 51 insertions, 13 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs
index f37e12a..815a505 100644
--- a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs
+++ b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs
@@ -331,6 +331,21 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
331 set { } 331 set { }
332 } 332 }
333 333
334 public LLUUID ActiveGroupId
335 {
336 get { return LLUUID.Zero; }
337 }
338
339 public string ActiveGroupName
340 {
341 get { return String.Empty; }
342 }
343
344 public ulong ActiveGroupPowers
345 {
346 get { return 0; }
347 }
348
334 public virtual int NextAnimationSequenceNumber 349 public virtual int NextAnimationSequenceNumber
335 { 350 {
336 get { return 1; } 351 get { return 1; }
@@ -743,4 +758,4 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
743 } 758 }
744 #endregion 759 #endregion
745 } 760 }
746} \ No newline at end of file 761}
diff --git a/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs
index 43e8f36..a319119 100644
--- a/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs
@@ -882,7 +882,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
882 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 882 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
883 if (m_bypassPermissions) return m_bypassPermissionsValue; 883 if (m_bypassPermissions) return m_bypassPermissionsValue;
884 884
885 return true; 885 return false;
886 } 886 }
887 887
888 private bool CanViewNotecard(LLUUID notecard, LLUUID objectID, LLUUID user, Scene scene) 888 private bool CanViewNotecard(LLUUID notecard, LLUUID objectID, LLUUID user, Scene scene)
@@ -890,7 +890,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
890 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 890 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
891 if (m_bypassPermissions) return m_bypassPermissionsValue; 891 if (m_bypassPermissions) return m_bypassPermissionsValue;
892 892
893 return true; 893 return false;
894 } 894 }
895 895
896 #endregion 896 #endregion
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
index 88f0cb4..8b94100 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
@@ -769,7 +769,7 @@ namespace OpenSim.Region.Environment.Scenes
769 { 769 {
770 if (XferManager != null) 770 if (XferManager != null)
771 { 771 {
772 group.RequestInventoryFile(primLocalID, XferManager); 772 group.RequestInventoryFile(remoteClient, primLocalID, XferManager);
773 } 773 }
774 } 774 }
775 } 775 }
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs
index c26ff51..d35765c 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs
@@ -157,12 +157,12 @@ namespace OpenSim.Region.Environment.Scenes
157 /// </summary> 157 /// </summary>
158 /// <param name="localID"></param> 158 /// <param name="localID"></param>
159 /// <param name="xferManager"></param> 159 /// <param name="xferManager"></param>
160 public void RequestInventoryFile(uint localID, IXfer xferManager) 160 public void RequestInventoryFile(IClientAPI client, uint localID, IXfer xferManager)
161 { 161 {
162 SceneObjectPart part = GetChildPart(localID); 162 SceneObjectPart part = GetChildPart(localID);
163 if (part != null) 163 if (part != null)
164 { 164 {
165 part.RequestInventoryFile(xferManager); 165 part.RequestInventoryFile(client, xferManager);
166 } 166 }
167 else 167 else
168 { 168 {
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)