aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/IClientAPI.cs11
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs23
-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
-rw-r--r--OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs15
8 files changed, 98 insertions, 15 deletions
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index 44d3295..098943c 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -634,9 +634,14 @@ namespace OpenSim.Framework
634 634
635 LLUUID SecureSessionId { get; } 635 LLUUID SecureSessionId { get; }
636 636
637 [Obsolete("LLClientView Specific - Use .Name instead. Do not assume an av has two names. Adam, this is impossible to completely refactor out. Nor would I suggest it. All applications that i've ever dealt with have firstname and lastname. However the firstname and lastname are not always the username.")] 637 LLUUID ActiveGroupId { get; }
638
639 string ActiveGroupName { get; }
640
641 ulong ActiveGroupPowers { get; }
642
638 string FirstName { get; } 643 string FirstName { get; }
639 [Obsolete("LLClientView Specific - Use .Name instead. Do not assume an av has two names. Adam, this is impossible to completely refactor out. Nor would I suggest it. All applications that i've ever dealt with have firstname and lastname. However the firstname and lastname are not always the username.")] 644
640 string LastName { get; } 645 string LastName { get; }
641 646
642 [Obsolete("LLClientView Specific - Replace with ???")] 647 [Obsolete("LLClientView Specific - Replace with ???")]
@@ -655,6 +660,8 @@ namespace OpenSim.Framework
655 set; 660 set;
656 } 661 }
657 662
663
664
658 [Obsolete("LLClientView Specific - Circuits are unique to LLClientView")] 665 [Obsolete("LLClientView Specific - Circuits are unique to LLClientView")]
659 uint CircuitCode { get; } 666 uint CircuitCode { get; }
660 [Obsolete("LLClientView Specific - Replace with more bare-bones arguments.")] 667 [Obsolete("LLClientView Specific - Replace with more bare-bones arguments.")]
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 180a806..a86941f 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -129,6 +129,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
129 protected LLVector3 m_startpos; 129 protected LLVector3 m_startpos;
130 protected EndPoint m_userEndPoint; 130 protected EndPoint m_userEndPoint;
131 protected EndPoint m_proxyEndPoint; 131 protected EndPoint m_proxyEndPoint;
132 protected LLUUID m_activeGroupID = LLUUID.Zero;
133 protected string m_activeGroupName = String.Empty;
134 protected ulong m_activeGroupPowers = 0;
132 135
133 /* Instantiated Designated Event Delegates */ 136 /* Instantiated Designated Event Delegates */
134 //- used so we don't create new objects for each incoming packet and then toss it out later */ 137 //- used so we don't create new objects for each incoming packet and then toss it out later */
@@ -274,6 +277,21 @@ namespace OpenSim.Region.ClientStack.LindenUDP
274 get { return m_agentId; } 277 get { return m_agentId; }
275 } 278 }
276 279
280 public LLUUID ActiveGroupId
281 {
282 get { return m_activeGroupID; }
283 }
284
285 public string ActiveGroupName
286 {
287 get { return m_activeGroupName; }
288 }
289
290 public ulong ActiveGroupPowers
291 {
292 get { return m_activeGroupPowers; }
293 }
294
277 /// <summary> 295 /// <summary>
278 /// This is a utility method used by single states to not duplicate kicks and blue card of death messages. 296 /// This is a utility method used by single states to not duplicate kicks and blue card of death messages.
279 /// </summary> 297 /// </summary>
@@ -1691,6 +1709,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1691 1709
1692 public void SendAgentDataUpdate(LLUUID agentid, LLUUID activegroupid, string firstname, string lastname, ulong grouppowers, string groupname, string grouptitle) 1710 public void SendAgentDataUpdate(LLUUID agentid, LLUUID activegroupid, string firstname, string lastname, ulong grouppowers, string groupname, string grouptitle)
1693 { 1711 {
1712
1713 m_activeGroupID = activegroupid;
1714 m_activeGroupName = groupname;
1715 m_activeGroupPowers = grouppowers;
1716
1694 AgentDataUpdatePacket sendAgentDataUpdate = (AgentDataUpdatePacket)PacketPool.Instance.GetPacket(PacketType.AgentDataUpdate); 1717 AgentDataUpdatePacket sendAgentDataUpdate = (AgentDataUpdatePacket)PacketPool.Instance.GetPacket(PacketType.AgentDataUpdate);
1695 sendAgentDataUpdate.AgentData.ActiveGroupID = activegroupid; 1718 sendAgentDataUpdate.AgentData.ActiveGroupID = activegroupid;
1696 sendAgentDataUpdate.AgentData.AgentID = agentid; 1719 sendAgentDataUpdate.AgentData.AgentID = agentid;
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)
diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
index 78b5d1f..ca8636f 100644
--- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
+++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
@@ -246,6 +246,21 @@ namespace OpenSim.Region.Examples.SimpleModule
246 set { } 246 set { }
247 } 247 }
248 248
249 public LLUUID ActiveGroupId
250 {
251 get { return LLUUID.Zero; }
252 }
253
254 public string ActiveGroupName
255 {
256 get { return String.Empty; }
257 }
258
259 public ulong ActiveGroupPowers
260 {
261 get { return 0; }
262 }
263
249 public virtual int NextAnimationSequenceNumber 264 public virtual int NextAnimationSequenceNumber
250 { 265 {
251 get { return 1; } 266 get { return 1; }