aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs14
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs68
2 files changed, 10 insertions, 72 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index a524561..6667c35 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -3406,6 +3406,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3406 3406
3407 public void SendAgentGroupDataUpdate(UUID avatarID, GroupMembershipData[] data) 3407 public void SendAgentGroupDataUpdate(UUID avatarID, GroupMembershipData[] data)
3408 { 3408 {
3409 IEventQueue eq = this.Scene.RequestModuleInterface<IEventQueue>();
3410
3411 // use UDP if no caps
3412 if (eq == null)
3413 {
3414 SendGroupMembership(data);
3415 }
3416
3409 OSDMap llsd = new OSDMap(3); 3417 OSDMap llsd = new OSDMap(3);
3410 OSDArray AgentData = new OSDArray(1); 3418 OSDArray AgentData = new OSDArray(1);
3411 OSDMap AgentDataMap = new OSDMap(1); 3419 OSDMap AgentDataMap = new OSDMap(1);
@@ -3432,11 +3440,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3432 llsd.Add("GroupData", GroupData); 3440 llsd.Add("GroupData", GroupData);
3433 llsd.Add("NewGroupData", NewGroupData); 3441 llsd.Add("NewGroupData", NewGroupData);
3434 3442
3435 IEventQueue eq = this.Scene.RequestModuleInterface<IEventQueue>(); 3443 eq.Enqueue(BuildEvent("AgentGroupDataUpdate", llsd), this.AgentId);
3436 if (eq != null)
3437 {
3438 eq.Enqueue(BuildEvent("AgentGroupDataUpdate", llsd), this.AgentId);
3439 }
3440 } 3444 }
3441 3445
3442 public void SendJoinGroupReply(UUID groupID, bool success) 3446 public void SendJoinGroupReply(UUID groupID, bool success)
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
index ec5aecd..7f58528 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
@@ -1297,66 +1297,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
1297 return child; 1297 return child;
1298 } 1298 }
1299 1299
1300 /// <summary>
1301 /// Send 'remoteClient' the group membership 'data' for agent 'dataForAgentID'.
1302 /// </summary>
1303 private void SendGroupMembershipInfoViaCaps(IClientAPI remoteClient, UUID dataForAgentID, GroupMembershipData[] data)
1304 {
1305 if (m_debugEnabled) m_log.InfoFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
1306
1307 OSDArray AgentData = new OSDArray(1);
1308 OSDMap AgentDataMap = new OSDMap(1);
1309 AgentDataMap.Add("AgentID", OSD.FromUUID(dataForAgentID));
1310 AgentData.Add(AgentDataMap);
1311
1312 OSDArray GroupData = new OSDArray(data.Length);
1313 OSDArray NewGroupData = new OSDArray(data.Length);
1314
1315 foreach (GroupMembershipData membership in data)
1316 {
1317 if (GetRequestingAgentID(remoteClient) != dataForAgentID)
1318 {
1319 if (!membership.ListInProfile)
1320 {
1321 // If we're sending group info to remoteclient about another agent,
1322 // filter out groups the other agent doesn't want to share.
1323 continue;
1324 }
1325 }
1326
1327 OSDMap GroupDataMap = new OSDMap(6);
1328 OSDMap NewGroupDataMap = new OSDMap(1);
1329
1330 GroupDataMap.Add("GroupID", OSD.FromUUID(membership.GroupID));
1331 GroupDataMap.Add("GroupPowers", OSD.FromULong(membership.GroupPowers));
1332 GroupDataMap.Add("AcceptNotices", OSD.FromBoolean(membership.AcceptNotices));
1333 GroupDataMap.Add("GroupInsigniaID", OSD.FromUUID(membership.GroupPicture));
1334 GroupDataMap.Add("Contribution", OSD.FromInteger(membership.Contribution));
1335 GroupDataMap.Add("GroupName", OSD.FromString(membership.GroupName));
1336 NewGroupDataMap.Add("ListInProfile", OSD.FromBoolean(membership.ListInProfile));
1337
1338 GroupData.Add(GroupDataMap);
1339 NewGroupData.Add(NewGroupDataMap);
1340 }
1341
1342 OSDMap llDataStruct = new OSDMap(3);
1343 llDataStruct.Add("AgentData", AgentData);
1344 llDataStruct.Add("GroupData", GroupData);
1345 llDataStruct.Add("NewGroupData", NewGroupData);
1346
1347 if (m_debugEnabled)
1348 {
1349 m_log.InfoFormat("[GROUPS]: {0}", OSDParser.SerializeJsonString(llDataStruct));
1350 }
1351
1352 IEventQueue queue = remoteClient.Scene.RequestModuleInterface<IEventQueue>();
1353
1354 if (queue != null)
1355 {
1356 queue.Enqueue(queue.BuildEvent("AgentGroupDataUpdate", llDataStruct), GetRequestingAgentID(remoteClient));
1357 }
1358 }
1359
1360 private void SendScenePresenceUpdate(UUID AgentID, string Title) 1300 private void SendScenePresenceUpdate(UUID AgentID, string Title)
1361 { 1301 {
1362 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: Updating scene title for {0} with title: {1}", AgentID, Title); 1302 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: Updating scene title for {0} with title: {1}", AgentID, Title);
@@ -1397,14 +1337,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
1397 1337
1398 SendDataUpdate(remoteClient, tellOthers); 1338 SendDataUpdate(remoteClient, tellOthers);
1399 1339
1400 // Need to send a group membership update to the client
1401 // UDP version doesn't seem to behave nicely. But we're going to send it out here
1402 // with an empty group membership to hopefully remove groups being displayed due
1403 // to the core Groups Stub
1404 remoteClient.SendGroupMembership(new GroupMembershipData[0]);
1405
1406 GroupMembershipData[] membershipArray = GetProfileListedGroupMemberships(remoteClient, agentID); 1340 GroupMembershipData[] membershipArray = GetProfileListedGroupMemberships(remoteClient, agentID);
1407 SendGroupMembershipInfoViaCaps(remoteClient, agentID, membershipArray); 1341 remoteClient.SendAgentGroupDataUpdate(agentID, membershipArray);
1408 1342
1409 remoteClient.RefreshGroupMembership(); 1343 remoteClient.RefreshGroupMembership();
1410 } 1344 }