Same issue as previous commit.
parent
698b2135ee
commit
c442ef346e
|
@ -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)
|
||||||
{
|
{
|
||||||
|
|
|
@ -255,13 +255,19 @@ namespace OpenSim.Groups
|
||||||
return members;
|
return members;
|
||||||
List<RoleData> rolesList = new List<RoleData>(roles);
|
List<RoleData> rolesList = new List<RoleData>(roles);
|
||||||
|
|
||||||
// Is the requester a member of the group?
|
// Check visibility?
|
||||||
bool isInGroup = false;
|
// When we don't want to check visibility, we pass it "all" as the requestingAgentID
|
||||||
if (m_Database.RetrieveMember(GroupID, RequestingAgentID) != null)
|
bool checkVisibility = !RequestingAgentID.Equals("all");
|
||||||
isInGroup = true;
|
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
|
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))
|
||||||
|
|
Loading…
Reference in New Issue