mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 06:06:06 +08:00
add GetFullGroupPowers(agentID, groupID) to groups modules. This returns the 'sum' of powers of all agent roles on that group, apply it to some OSSL (mantis 8777). It May be needed elsewhere
This commit is contained in:
@@ -763,6 +763,31 @@ namespace OpenSim.Groups
|
||||
return data;
|
||||
}
|
||||
|
||||
public ulong GetFullGroupPowers(UUID agentID, UUID groupID)
|
||||
{
|
||||
if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
|
||||
|
||||
List<GroupRolesData> data = m_groupData.GetGroupRoles(agentID.ToString(), groupID);
|
||||
if (data == null || data.Count == 0)
|
||||
return 0;
|
||||
|
||||
ulong powers = 0;
|
||||
for (int i = 0; i < data.Count; ++i)
|
||||
{
|
||||
powers |= data[i].Powers;
|
||||
}
|
||||
return powers;
|
||||
}
|
||||
|
||||
public List<GroupRolesData> GroupRoleDataRequest(UUID agentID, UUID groupID)
|
||||
{
|
||||
if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
|
||||
|
||||
List<GroupRolesData> data = m_groupData.GetGroupRoles(agentID.ToString(), groupID);
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
public List<GroupRolesData> GroupRoleDataRequest(IClientAPI remoteClient, UUID groupID)
|
||||
{
|
||||
if (m_debugEnabled) m_log.DebugFormat("[Groups]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
|
||||
|
||||
Reference in New Issue
Block a user