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

View File

@ -255,13 +255,19 @@ namespace OpenSim.Groups
return members;
List<RoleData> rolesList = new List<RoleData>(roles);
// Is the requester a member of the group?
bool isInGroup = false;
if (m_Database.RetrieveMember(GroupID, RequestingAgentID) != null)
isInGroup = true;
// 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?
bool isInGroup = false;
if (m_Database.RetrieveMember(GroupID, RequestingAgentID) != null)
isInGroup = true;
if (!isInGroup) // reduce the roles to the visible ones
rolesList = rolesList.FindAll(r => (UInt64.Parse(r.Data["Powers"]) & (ulong)GroupPowers.MemberVisible) != 0);
if (!isInGroup) // reduce the roles to the visible ones
rolesList = rolesList.FindAll(r => (UInt64.Parse(r.Data["Powers"]) & (ulong)GroupPowers.MemberVisible) != 0);
}
MembershipData[] datas = m_Database.RetrieveMembers(GroupID);
if (datas == null || (datas != null && datas.Length == 0))