aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Addons/Groups/GroupsModule.cs3
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs6
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs50
-rw-r--r--OpenSim/Region/Framework/Interfaces/IEventQueue.cs2
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs3
-rw-r--r--OpenSim/Tests/Common/Mock/TestEventQueueGetModule.cs5
6 files changed, 66 insertions, 3 deletions
diff --git a/OpenSim/Addons/Groups/GroupsModule.cs b/OpenSim/Addons/Groups/GroupsModule.cs
index 1a83f5b..f24670a 100644
--- a/OpenSim/Addons/Groups/GroupsModule.cs
+++ b/OpenSim/Addons/Groups/GroupsModule.cs
@@ -1245,7 +1245,8 @@ namespace OpenSim.Groups
1245 SendDataUpdate(remoteClient, tellOthers); 1245 SendDataUpdate(remoteClient, tellOthers);
1246 1246
1247 GroupMembershipData[] membershipArray = GetProfileListedGroupMemberships(remoteClient, agentID); 1247 GroupMembershipData[] membershipArray = GetProfileListedGroupMemberships(remoteClient, agentID);
1248 remoteClient.SendAgentGroupDataUpdate(agentID, membershipArray); 1248 IEventQueue eq = remoteClient.Scene.RequestModuleInterface<IEventQueue>();
1249 eq.GroupMembershipData(GetRequestingAgentID(remoteClient), membershipArray);
1249 1250
1250 remoteClient.RefreshGroupMembership(); 1251 remoteClient.RefreshGroupMembership();
1251 } 1252 }
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();
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;
30using OpenMetaverse.Packets; 30using OpenMetaverse.Packets;
31using OpenMetaverse.Messages.Linden; 31using OpenMetaverse.Messages.Linden;
32using OpenMetaverse.StructuredData; 32using OpenMetaverse.StructuredData;
33using OpenSim.Framework;
33 34
34namespace OpenSim.Region.Framework.Interfaces 35namespace 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 }
diff --git a/OpenSim/Tests/Common/Mock/TestEventQueueGetModule.cs b/OpenSim/Tests/Common/Mock/TestEventQueueGetModule.cs
index f2bae58..332d59c 100644
--- a/OpenSim/Tests/Common/Mock/TestEventQueueGetModule.cs
+++ b/OpenSim/Tests/Common/Mock/TestEventQueueGetModule.cs
@@ -162,6 +162,11 @@ namespace OpenSim.Tests.Common
162 AddEvent(avatarID, "GroupMembership", groupUpdate); 162 AddEvent(avatarID, "GroupMembership", groupUpdate);
163 } 163 }
164 164
165 public void GroupMembershipData(UUID receiverAgent, GroupMembershipData[] data)
166 {
167 AddEvent(receiverAgent, "AgentGroupDataUpdate", data);
168 }
169
165 public OSD ScriptRunningEvent (UUID objectID, UUID itemID, bool running, bool mono) 170 public OSD ScriptRunningEvent (UUID objectID, UUID itemID, bool running, bool mono)
166 { 171 {
167 Console.WriteLine("ONE"); 172 Console.WriteLine("ONE");