aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs6
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs50
2 files changed, 55 insertions, 1 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs
index feb3322..9a1cef4 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs
@@ -585,6 +585,12 @@ namespace OpenSim.Region.ClientStack.Linden
585 Enqueue(item, avatarID); 585 Enqueue(item, avatarID);
586 } 586 }
587 587
588 public void GroupMembershipData(UUID receiverAgent, GroupMembershipData[] data)
589 {
590 OSD item = EventQueueHelper.GroupMembershipData(receiverAgent, data);
591 Enqueue(item, receiverAgent);
592 }
593
588 public void QueryReply(PlacesReplyPacket groupUpdate, UUID avatarID) 594 public void QueryReply(PlacesReplyPacket groupUpdate, UUID avatarID)
589 { 595 {
590 OSD item = EventQueueHelper.PlacesQuery(groupUpdate); 596 OSD item = EventQueueHelper.PlacesQuery(groupUpdate);
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs
index 799ad0b..2344fc6 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs
@@ -32,6 +32,8 @@ using OpenMetaverse.Packets;
32using OpenMetaverse.StructuredData; 32using OpenMetaverse.StructuredData;
33using OpenMetaverse.Messages.Linden; 33using OpenMetaverse.Messages.Linden;
34 34
35using OpenSim.Framework;
36
35namespace OpenSim.Region.ClientStack.Linden 37namespace OpenSim.Region.ClientStack.Linden
36{ 38{
37 public class EventQueueHelper 39 public class EventQueueHelper
@@ -364,7 +366,53 @@ namespace OpenSim.Region.ClientStack.Linden
364 366
365 return groupUpdate; 367 return groupUpdate;
366 } 368 }
367 369
370 public static OSD GroupMembershipData(UUID receiverAgent, GroupMembershipData[] data)
371 {
372 OSDArray AgentData = new OSDArray(1);
373 OSDMap AgentDataMap = new OSDMap(1);
374 AgentDataMap.Add("AgentID", OSD.FromUUID(receiverAgent));
375 AgentData.Add(AgentDataMap);
376
377 OSDArray GroupData = new OSDArray(data.Length);
378 OSDArray NewGroupData = new OSDArray(data.Length);
379
380 foreach (GroupMembershipData membership in data)
381 {
382 //if (receiverAgent != dataForAgentID)
383 //{
384 // if (!membership.ListInProfile)
385 // {
386 // // If we're sending group info to remoteclient about another agent,
387 // // filter out groups the other agent doesn't want to share.
388 // continue;
389 // }
390 //}
391
392 OSDMap GroupDataMap = new OSDMap(6);
393 OSDMap NewGroupDataMap = new OSDMap(1);
394
395 GroupDataMap.Add("GroupID", OSD.FromUUID(membership.GroupID));
396 GroupDataMap.Add("GroupPowers", OSD.FromULong(membership.GroupPowers));
397 GroupDataMap.Add("AcceptNotices", OSD.FromBoolean(membership.AcceptNotices));
398 GroupDataMap.Add("GroupInsigniaID", OSD.FromUUID(membership.GroupPicture));
399 GroupDataMap.Add("Contribution", OSD.FromInteger(membership.Contribution));
400 GroupDataMap.Add("GroupName", OSD.FromString(membership.GroupName));
401 NewGroupDataMap.Add("ListInProfile", OSD.FromBoolean(membership.ListInProfile));
402
403 GroupData.Add(GroupDataMap);
404 NewGroupData.Add(NewGroupDataMap);
405 }
406
407 OSDMap llDataStruct = new OSDMap(3);
408 llDataStruct.Add("AgentData", AgentData);
409 llDataStruct.Add("GroupData", GroupData);
410 llDataStruct.Add("NewGroupData", NewGroupData);
411
412 return BuildEvent("AgentGroupDataUpdate", llDataStruct);
413
414 }
415
368 public static OSD PlacesQuery(PlacesReplyPacket PlacesReply) 416 public static OSD PlacesQuery(PlacesReplyPacket PlacesReply)
369 { 417 {
370 OSDMap placesReply = new OSDMap(); 418 OSDMap placesReply = new OSDMap();