A final couple of tweaks to GroupsModule.cs. Remove unneeded delegate, and prettify codeing style/formatting
parent
8bacf56e46
commit
c43ad8a0e7
|
@ -1223,6 +1223,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get a list of groups memberships for the agent that are marked "ListInProfile"
|
/// Get a list of groups memberships for the agent that are marked "ListInProfile"
|
||||||
|
/// (unless that agent has a godLike aspect, in which case get all groups)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="dataForAgentID"></param>
|
/// <param name="dataForAgentID"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
|
@ -1231,6 +1232,17 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
||||||
List<GroupMembershipData> membershipData = m_groupData.GetAgentGroupMemberships(requestingClient.AgentId, dataForAgentID);
|
List<GroupMembershipData> membershipData = m_groupData.GetAgentGroupMemberships(requestingClient.AgentId, dataForAgentID);
|
||||||
GroupMembershipData[] membershipArray;
|
GroupMembershipData[] membershipArray;
|
||||||
|
|
||||||
|
// cScene and property accessor 'isGod' are in support of the opertions to bypass 'hidden' group attributes for
|
||||||
|
// those with a GodLike aspect.
|
||||||
|
Scene cScene = (Scene) requestingClient.Scene;
|
||||||
|
bool isGod = cScene.Permissions.IsGod(requestingClient.AgentId);
|
||||||
|
|
||||||
|
if (isGod) {
|
||||||
|
membershipArray = membershipData.ToArray();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
if (requestingClient.AgentId != dataForAgentID)
|
if (requestingClient.AgentId != dataForAgentID)
|
||||||
{
|
{
|
||||||
Predicate<GroupMembershipData> showInProfile = delegate(GroupMembershipData membership)
|
Predicate<GroupMembershipData> showInProfile = delegate(GroupMembershipData membership)
|
||||||
|
@ -1244,7 +1256,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
||||||
{
|
{
|
||||||
membershipArray = membershipData.ToArray();
|
membershipArray = membershipData.ToArray();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (m_debugEnabled)
|
if (m_debugEnabled)
|
||||||
{
|
{
|
||||||
m_log.InfoFormat("[GROUPS]: Get group membership information for {0} requested by {1}", dataForAgentID, requestingClient.AgentId);
|
m_log.InfoFormat("[GROUPS]: Get group membership information for {0} requested by {1}", dataForAgentID, requestingClient.AgentId);
|
||||||
|
@ -1257,6 +1269,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
||||||
return membershipArray;
|
return membershipArray;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void SendAgentDataUpdate(IClientAPI remoteClient, UUID dataForAgentID, UUID activeGroupID, string activeGroupName, ulong activeGroupPowers, string activeGroupTitle)
|
private void SendAgentDataUpdate(IClientAPI remoteClient, UUID dataForAgentID, UUID activeGroupID, string activeGroupName, ulong activeGroupPowers, string activeGroupTitle)
|
||||||
{
|
{
|
||||||
if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
|
if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
|
||||||
|
|
Loading…
Reference in New Issue