aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/OptionalModules')
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs68
1 files changed, 1 insertions, 67 deletions
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 }