Same issue as previous commit.

TeleportWork
Diva Canto 2013-07-28 16:44:31 -07:00
parent 698b2135ee
commit c442ef346e
2 changed files with 17 additions and 14 deletions

View File

@ -246,7 +246,7 @@ namespace OpenSim.Groups
public void SendMessageToGroup(GridInstantMessage im, UUID groupID) public void SendMessageToGroup(GridInstantMessage im, UUID groupID)
{ {
UUID fromAgentID = new UUID(im.fromAgentID); UUID fromAgentID = new UUID(im.fromAgentID);
List<GroupMembersData> groupMembers = m_groupData.GetGroupMembers(fromAgentID.ToString(), groupID); List<GroupMembersData> groupMembers = m_groupData.GetGroupMembers("all", groupID);
int groupMembersCount = groupMembers.Count; int groupMembersCount = groupMembers.Count;
PresenceInfo[] onlineAgents = null; PresenceInfo[] onlineAgents = null;
@ -403,15 +403,12 @@ namespace OpenSim.Groups
Scene aScene = m_sceneList[0]; Scene aScene = m_sceneList[0];
GridRegion regionOfOrigin = aScene.GridService.GetRegionByUUID(aScene.RegionInfo.ScopeID, regionID); GridRegion regionOfOrigin = aScene.GridService.GetRegionByUUID(aScene.RegionInfo.ScopeID, regionID);
// Let's find out who sent it List<GroupMembersData> groupMembers = m_groupData.GetGroupMembers("all", GroupID);
string requestingAgent = m_UserManagement.GetUserUUI(new UUID(msg.fromAgentID));
List<GroupMembersData> groupMembers = m_groupData.GetGroupMembers(requestingAgent, GroupID);
List<UUID> alreadySeen = new List<UUID>(); List<UUID> alreadySeen = new List<UUID>();
if (m_debugEnabled) //if (m_debugEnabled)
foreach (GroupMembersData m in groupMembers) // foreach (GroupMembersData m in groupMembers)
m_log.DebugFormat("[Groups.Messaging]: member {0}", m.AgentID); // m_log.DebugFormat("[Groups.Messaging]: member {0}", m.AgentID);
foreach (Scene s in m_sceneList) foreach (Scene s in m_sceneList)
{ {

View File

@ -255,6 +255,11 @@ namespace OpenSim.Groups
return members; return members;
List<RoleData> rolesList = new List<RoleData>(roles); List<RoleData> rolesList = new List<RoleData>(roles);
// Check visibility?
// When we don't want to check visibility, we pass it "all" as the requestingAgentID
bool checkVisibility = !RequestingAgentID.Equals("all");
if (checkVisibility)
{
// Is the requester a member of the group? // Is the requester a member of the group?
bool isInGroup = false; bool isInGroup = false;
if (m_Database.RetrieveMember(GroupID, RequestingAgentID) != null) if (m_Database.RetrieveMember(GroupID, RequestingAgentID) != null)
@ -262,6 +267,7 @@ namespace OpenSim.Groups
if (!isInGroup) // reduce the roles to the visible ones if (!isInGroup) // reduce the roles to the visible ones
rolesList = rolesList.FindAll(r => (UInt64.Parse(r.Data["Powers"]) & (ulong)GroupPowers.MemberVisible) != 0); rolesList = rolesList.FindAll(r => (UInt64.Parse(r.Data["Powers"]) & (ulong)GroupPowers.MemberVisible) != 0);
}
MembershipData[] datas = m_Database.RetrieveMembers(GroupID); MembershipData[] datas = m_Database.RetrieveMembers(GroupID);
if (datas == null || (datas != null && datas.Length == 0)) if (datas == null || (datas != null && datas.Length == 0))