diff options
author | Diva Canto | 2016-06-19 16:27:12 -0700 |
---|---|---|
committer | Diva Canto | 2016-06-19 16:27:12 -0700 |
commit | 76ab1ed10c57d8f2190366d8a61f9c989afff3df (patch) | |
tree | 787480a3d633175c86a481944f0b39bdb5ca0713 /OpenSim/Region/ClientStack | |
parent | Mantis #7915: bring XmlRpcGroups/GroupsModule.cs up to speed with Groups V2 (diff) | |
download | opensim-SC_OLD-76ab1ed10c57d8f2190366d8a61f9c989afff3df.zip opensim-SC_OLD-76ab1ed10c57d8f2190366d8a61f9c989afff3df.tar.gz opensim-SC_OLD-76ab1ed10c57d8f2190366d8a61f9c989afff3df.tar.bz2 opensim-SC_OLD-76ab1ed10c57d8f2190366d8a61f9c989afff3df.tar.xz |
Restored sending group membership data via EventQueue -- this had been a regression. Took the opportunity to refactor that code, so that both Groups V2 and XmlRpcGroups can use the same function.
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs | 6 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs | 50 |
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; | |||
32 | using OpenMetaverse.StructuredData; | 32 | using OpenMetaverse.StructuredData; |
33 | using OpenMetaverse.Messages.Linden; | 33 | using OpenMetaverse.Messages.Linden; |
34 | 34 | ||
35 | using OpenSim.Framework; | ||
36 | |||
35 | namespace OpenSim.Region.ClientStack.Linden | 37 | namespace 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(); |