diff options
Diffstat (limited to '')
5 files changed, 28 insertions, 21 deletions
diff --git a/OpenSim/Addons/Groups/GroupsMessagingModule.cs b/OpenSim/Addons/Groups/GroupsMessagingModule.cs index 5de1fb4..be59c62 100644 --- a/OpenSim/Addons/Groups/GroupsMessagingModule.cs +++ b/OpenSim/Addons/Groups/GroupsMessagingModule.cs | |||
@@ -246,7 +246,7 @@ namespace OpenSim.Groups | |||
246 | public void SendMessageToGroup(GridInstantMessage im, UUID groupID) | 246 | public void SendMessageToGroup(GridInstantMessage im, UUID groupID) |
247 | { | 247 | { |
248 | UUID fromAgentID = new UUID(im.fromAgentID); | 248 | UUID fromAgentID = new UUID(im.fromAgentID); |
249 | List<GroupMembersData> groupMembers = m_groupData.GetGroupMembers("all", groupID); | 249 | List<GroupMembersData> groupMembers = m_groupData.GetGroupMembers(UUID.Zero.ToString(), groupID); |
250 | int groupMembersCount = groupMembers.Count; | 250 | int groupMembersCount = groupMembers.Count; |
251 | PresenceInfo[] onlineAgents = null; | 251 | PresenceInfo[] onlineAgents = null; |
252 | 252 | ||
@@ -297,6 +297,10 @@ namespace OpenSim.Groups | |||
297 | if (member.AgentID.Guid == im.fromAgentID) | 297 | if (member.AgentID.Guid == im.fromAgentID) |
298 | continue; | 298 | continue; |
299 | 299 | ||
300 | if (clientsAlreadySent.Contains(member.AgentID)) | ||
301 | continue; | ||
302 | clientsAlreadySent.Add(member.AgentID); | ||
303 | |||
300 | if (hasAgentDroppedGroupChatSession(member.AgentID.ToString(), groupID)) | 304 | if (hasAgentDroppedGroupChatSession(member.AgentID.ToString(), groupID)) |
301 | { | 305 | { |
302 | // Don't deliver messages to people who have dropped this session | 306 | // Don't deliver messages to people who have dropped this session |
@@ -336,12 +340,9 @@ namespace OpenSim.Groups | |||
336 | // Deliver locally, directly | 340 | // Deliver locally, directly |
337 | if (m_debugEnabled) m_log.DebugFormat("[Groups.Messaging]: Passing to ProcessMessageFromGroupSession to deliver to {0} locally", client.Name); | 341 | if (m_debugEnabled) m_log.DebugFormat("[Groups.Messaging]: Passing to ProcessMessageFromGroupSession to deliver to {0} locally", client.Name); |
338 | 342 | ||
339 | if (clientsAlreadySent.Contains(member.AgentID)) | ||
340 | continue; | ||
341 | clientsAlreadySent.Add(member.AgentID); | ||
342 | |||
343 | ProcessMessageFromGroupSession(im); | 343 | ProcessMessageFromGroupSession(im); |
344 | } | 344 | } |
345 | |||
345 | } | 346 | } |
346 | 347 | ||
347 | if (m_debugEnabled) | 348 | if (m_debugEnabled) |
@@ -403,8 +404,7 @@ namespace OpenSim.Groups | |||
403 | Scene aScene = m_sceneList[0]; | 404 | Scene aScene = m_sceneList[0]; |
404 | GridRegion regionOfOrigin = aScene.GridService.GetRegionByUUID(aScene.RegionInfo.ScopeID, regionID); | 405 | GridRegion regionOfOrigin = aScene.GridService.GetRegionByUUID(aScene.RegionInfo.ScopeID, regionID); |
405 | 406 | ||
406 | List<GroupMembersData> groupMembers = m_groupData.GetGroupMembers("all", GroupID); | 407 | List<GroupMembersData> groupMembers = m_groupData.GetGroupMembers(UUID.Zero.ToString(), GroupID); |
407 | List<UUID> alreadySeen = new List<UUID>(); | ||
408 | 408 | ||
409 | //if (m_debugEnabled) | 409 | //if (m_debugEnabled) |
410 | // foreach (GroupMembersData m in groupMembers) | 410 | // foreach (GroupMembersData m in groupMembers) |
@@ -414,15 +414,10 @@ namespace OpenSim.Groups | |||
414 | { | 414 | { |
415 | s.ForEachScenePresence(sp => | 415 | s.ForEachScenePresence(sp => |
416 | { | 416 | { |
417 | // We need this, because we are searching through all | 417 | // If we got this via grid messaging, it's because the caller thinks |
418 | // SPs, both root and children | 418 | // that the root agent is here. We should only send the IM to root agents. |
419 | if (alreadySeen.Contains(sp.UUID)) | 419 | if (sp.IsChildAgent) |
420 | { | ||
421 | if (m_debugEnabled) | ||
422 | m_log.DebugFormat("[Groups.Messaging]: skipping agent {0} because we've already seen it", sp.UUID); | ||
423 | return; | 420 | return; |
424 | } | ||
425 | alreadySeen.Add(sp.UUID); | ||
426 | 421 | ||
427 | GroupMembersData m = groupMembers.Find(gmd => | 422 | GroupMembersData m = groupMembers.Find(gmd => |
428 | { | 423 | { |
diff --git a/OpenSim/Addons/Groups/GroupsModule.cs b/OpenSim/Addons/Groups/GroupsModule.cs index 826fcbf..da8030c 100644 --- a/OpenSim/Addons/Groups/GroupsModule.cs +++ b/OpenSim/Addons/Groups/GroupsModule.cs | |||
@@ -991,6 +991,10 @@ namespace OpenSim.Groups | |||
991 | 991 | ||
992 | // Should this send updates to everyone in the group? | 992 | // Should this send updates to everyone in the group? |
993 | SendAgentGroupDataUpdate(remoteClient, GetRequestingAgentID(remoteClient)); | 993 | SendAgentGroupDataUpdate(remoteClient, GetRequestingAgentID(remoteClient)); |
994 | |||
995 | if (reason != string.Empty) | ||
996 | // A warning | ||
997 | remoteClient.SendAlertMessage("Warning: " + reason); | ||
994 | } | 998 | } |
995 | else | 999 | else |
996 | remoteClient.SendJoinGroupReply(groupID, false); | 1000 | remoteClient.SendJoinGroupReply(groupID, false); |
diff --git a/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs b/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs index daa0728..c33168c 100644 --- a/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs +++ b/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs | |||
@@ -254,7 +254,10 @@ namespace OpenSim.Groups | |||
254 | { | 254 | { |
255 | string url = string.Empty, gname = string.Empty; | 255 | string url = string.Empty, gname = string.Empty; |
256 | if (IsLocal(GroupID, out url, out gname)) | 256 | if (IsLocal(GroupID, out url, out gname)) |
257 | return m_LocalGroupsConnector.GetGroupMembers(AgentUUI(RequestingAgentID), GroupID); | 257 | { |
258 | string agentID = AgentUUI(RequestingAgentID); | ||
259 | return m_LocalGroupsConnector.GetGroupMembers(agentID, GroupID); | ||
260 | } | ||
258 | else if (!string.IsNullOrEmpty(url)) | 261 | else if (!string.IsNullOrEmpty(url)) |
259 | { | 262 | { |
260 | ExtendedGroupMembershipData membership = m_LocalGroupsConnector.GetAgentGroupMembership(RequestingAgentID, RequestingAgentID, GroupID); | 263 | ExtendedGroupMembershipData membership = m_LocalGroupsConnector.GetAgentGroupMembership(RequestingAgentID, RequestingAgentID, GroupID); |
@@ -396,17 +399,21 @@ namespace OpenSim.Groups | |||
396 | 399 | ||
397 | if (success) | 400 | if (success) |
398 | { | 401 | { |
402 | // Here we always return true. The user has been added to the local group, | ||
403 | // independent of whether the remote operation succeeds or not | ||
399 | url = m_UserManagement.GetUserServerURL(uid, "GroupsServerURI"); | 404 | url = m_UserManagement.GetUserServerURL(uid, "GroupsServerURI"); |
400 | if (url == string.Empty) | 405 | if (url == string.Empty) |
401 | { | 406 | { |
402 | reason = "User doesn't have a groups server"; | 407 | reason = "You don't have have an accessible groups server in your home world. You membership to this group in only within this grid."; |
403 | return false; | 408 | return true; |
404 | } | 409 | } |
405 | 410 | ||
406 | GroupsServiceHGConnector c = GetConnector(url); | 411 | GroupsServiceHGConnector c = GetConnector(url); |
407 | if (c != null) | 412 | if (c != null) |
408 | return c.CreateProxy(AgentUUI(RequestingAgentID), AgentID, token, GroupID, m_LocalGroupsServiceLocation, name, out reason); | 413 | c.CreateProxy(AgentUUI(RequestingAgentID), AgentID, token, GroupID, m_LocalGroupsServiceLocation, name, out reason); |
414 | return true; | ||
409 | } | 415 | } |
416 | return false; | ||
410 | } | 417 | } |
411 | } | 418 | } |
412 | else if (m_UserManagement.IsLocalGridUser(uid)) // local user | 419 | else if (m_UserManagement.IsLocalGridUser(uid)) // local user |
diff --git a/OpenSim/Addons/Groups/Remote/GroupsServiceRemoteConnector.cs b/OpenSim/Addons/Groups/Remote/GroupsServiceRemoteConnector.cs index 9a3e125..161ca0c 100644 --- a/OpenSim/Addons/Groups/Remote/GroupsServiceRemoteConnector.cs +++ b/OpenSim/Addons/Groups/Remote/GroupsServiceRemoteConnector.cs | |||
@@ -256,6 +256,7 @@ namespace OpenSim.Groups | |||
256 | Dictionary<string, object> sendData = new Dictionary<string, object>(); | 256 | Dictionary<string, object> sendData = new Dictionary<string, object>(); |
257 | sendData["GroupID"] = GroupID.ToString(); | 257 | sendData["GroupID"] = GroupID.ToString(); |
258 | sendData["RequestingAgentID"] = RequestingAgentID; | 258 | sendData["RequestingAgentID"] = RequestingAgentID; |
259 | |||
259 | Dictionary<string, object> ret = MakeRequest("GETGROUPMEMBERS", sendData); | 260 | Dictionary<string, object> ret = MakeRequest("GETGROUPMEMBERS", sendData); |
260 | 261 | ||
261 | if (ret == null) | 262 | if (ret == null) |
diff --git a/OpenSim/Addons/Groups/Service/GroupsService.cs b/OpenSim/Addons/Groups/Service/GroupsService.cs index 294b89a..037ef59 100644 --- a/OpenSim/Addons/Groups/Service/GroupsService.cs +++ b/OpenSim/Addons/Groups/Service/GroupsService.cs | |||
@@ -257,8 +257,8 @@ namespace OpenSim.Groups | |||
257 | 257 | ||
258 | // Check visibility? | 258 | // Check visibility? |
259 | // When we don't want to check visibility, we pass it "all" as the requestingAgentID | 259 | // When we don't want to check visibility, we pass it "all" as the requestingAgentID |
260 | bool checkVisibility = !RequestingAgentID.Equals("all"); | 260 | bool checkVisibility = !RequestingAgentID.Equals(UUID.Zero.ToString()); |
261 | m_log.DebugFormat("[ZZZ]: AgentID is {0}. checkVisibility is {1}", RequestingAgentID, checkVisibility); | 261 | |
262 | if (checkVisibility) | 262 | if (checkVisibility) |
263 | { | 263 | { |
264 | // Is the requester a member of the group? | 264 | // Is the requester a member of the group? |