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 | |
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')
4 files changed, 59 insertions, 2 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(); |
diff --git a/OpenSim/Region/Framework/Interfaces/IEventQueue.cs b/OpenSim/Region/Framework/Interfaces/IEventQueue.cs index dfc269e..f4014db 100644 --- a/OpenSim/Region/Framework/Interfaces/IEventQueue.cs +++ b/OpenSim/Region/Framework/Interfaces/IEventQueue.cs | |||
@@ -30,6 +30,7 @@ using OpenMetaverse; | |||
30 | using OpenMetaverse.Packets; | 30 | using OpenMetaverse.Packets; |
31 | using OpenMetaverse.Messages.Linden; | 31 | using OpenMetaverse.Messages.Linden; |
32 | using OpenMetaverse.StructuredData; | 32 | using OpenMetaverse.StructuredData; |
33 | using OpenSim.Framework; | ||
33 | 34 | ||
34 | namespace OpenSim.Region.Framework.Interfaces | 35 | namespace OpenSim.Region.Framework.Interfaces |
35 | { | 36 | { |
@@ -58,6 +59,7 @@ namespace OpenSim.Region.Framework.Interfaces | |||
58 | bool isModerator, bool textMute); | 59 | bool isModerator, bool textMute); |
59 | void ParcelProperties(ParcelPropertiesMessage parcelPropertiesMessage, UUID avatarID); | 60 | void ParcelProperties(ParcelPropertiesMessage parcelPropertiesMessage, UUID avatarID); |
60 | void GroupMembership(AgentGroupDataUpdatePacket groupUpdate, UUID avatarID); | 61 | void GroupMembership(AgentGroupDataUpdatePacket groupUpdate, UUID avatarID); |
62 | void GroupMembershipData(UUID receiverAgent, GroupMembershipData[] data); | ||
61 | OSD ScriptRunningEvent(UUID objectID, UUID itemID, bool running, bool mono); | 63 | OSD ScriptRunningEvent(UUID objectID, UUID itemID, bool running, bool mono); |
62 | OSD BuildEvent(string eventName, OSD eventBody); | 64 | OSD BuildEvent(string eventName, OSD eventBody); |
63 | void partPhysicsProperties(uint localID, byte physhapetype, float density, float friction, float bounce, float gravmod, UUID avatarID); | 65 | void partPhysicsProperties(uint localID, byte physhapetype, float density, float friction, float bounce, float gravmod, UUID avatarID); |
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs index 613748d..5dfbe2c 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs | |||
@@ -1372,7 +1372,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
1372 | SendDataUpdate(remoteClient, tellOthers); | 1372 | SendDataUpdate(remoteClient, tellOthers); |
1373 | 1373 | ||
1374 | GroupMembershipData[] membershipArray = GetProfileListedGroupMemberships(remoteClient, agentID); | 1374 | GroupMembershipData[] membershipArray = GetProfileListedGroupMemberships(remoteClient, agentID); |
1375 | remoteClient.SendAgentGroupDataUpdate(agentID, membershipArray); | 1375 | IEventQueue eq = remoteClient.Scene.RequestModuleInterface<IEventQueue>(); |
1376 | eq.GroupMembershipData(GetRequestingAgentID(remoteClient), membershipArray); | ||
1376 | 1377 | ||
1377 | remoteClient.RefreshGroupMembership(); | 1378 | remoteClient.RefreshGroupMembership(); |
1378 | } | 1379 | } |