aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/Avatar
diff options
context:
space:
mode:
authorMelanie2011-06-09 02:05:04 +0100
committerMelanie2011-06-09 02:05:04 +0100
commit326c46ba70cea70ddfe4aef9a6b73edff63e126a (patch)
tree5e76347b0d77f58717d8e5e4f3b8787ff01a18d7 /OpenSim/Region/OptionalModules/Avatar
parentMake the last otem in a list created with llCSV2List findable (diff)
parentConsistency fix on the last commit. (diff)
downloadopensim-SC_OLD-326c46ba70cea70ddfe4aef9a6b73edff63e126a.zip
opensim-SC_OLD-326c46ba70cea70ddfe4aef9a6b73edff63e126a.tar.gz
opensim-SC_OLD-326c46ba70cea70ddfe4aef9a6b73edff63e126a.tar.bz2
opensim-SC_OLD-326c46ba70cea70ddfe4aef9a6b73edff63e126a.tar.xz
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Region/OptionalModules/Avatar')
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs32
1 files changed, 23 insertions, 9 deletions
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
index 1c791b9..630fcab 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
@@ -1223,6 +1223,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
1223 1223
1224 /// <summary> 1224 /// <summary>
1225 /// Get a list of groups memberships for the agent that are marked "ListInProfile" 1225 /// Get a list of groups memberships for the agent that are marked "ListInProfile"
1226 /// (unless that agent has a godLike aspect, in which case get all groups)
1226 /// </summary> 1227 /// </summary>
1227 /// <param name="dataForAgentID"></param> 1228 /// <param name="dataForAgentID"></param>
1228 /// <returns></returns> 1229 /// <returns></returns>
@@ -1231,20 +1232,32 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
1231 List<GroupMembershipData> membershipData = m_groupData.GetAgentGroupMemberships(requestingClient.AgentId, dataForAgentID); 1232 List<GroupMembershipData> membershipData = m_groupData.GetAgentGroupMemberships(requestingClient.AgentId, dataForAgentID);
1232 GroupMembershipData[] membershipArray; 1233 GroupMembershipData[] membershipArray;
1233 1234
1234 if (requestingClient.AgentId != dataForAgentID) 1235 // cScene and property accessor 'isGod' are in support of the opertions to bypass 'hidden' group attributes for
1235 { 1236 // those with a GodLike aspect.
1236 Predicate<GroupMembershipData> showInProfile = delegate(GroupMembershipData membership) 1237 Scene cScene = (Scene)requestingClient.Scene;
1237 { 1238 bool isGod = cScene.Permissions.IsGod(requestingClient.AgentId);
1238 return membership.ListInProfile;
1239 };
1240 1239
1241 membershipArray = membershipData.FindAll(showInProfile).ToArray(); 1240 if (isGod)
1242 }
1243 else
1244 { 1241 {
1245 membershipArray = membershipData.ToArray(); 1242 membershipArray = membershipData.ToArray();
1246 } 1243 }
1244 else
1245 {
1246 if (requestingClient.AgentId != dataForAgentID)
1247 {
1248 Predicate<GroupMembershipData> showInProfile = delegate(GroupMembershipData membership)
1249 {
1250 return membership.ListInProfile;
1251 };
1247 1252
1253 membershipArray = membershipData.FindAll(showInProfile).ToArray();
1254 }
1255 else
1256 {
1257 membershipArray = membershipData.ToArray();
1258 }
1259 }
1260
1248 if (m_debugEnabled) 1261 if (m_debugEnabled)
1249 { 1262 {
1250 m_log.InfoFormat("[GROUPS]: Get group membership information for {0} requested by {1}", dataForAgentID, requestingClient.AgentId); 1263 m_log.InfoFormat("[GROUPS]: Get group membership information for {0} requested by {1}", dataForAgentID, requestingClient.AgentId);
@@ -1257,6 +1270,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
1257 return membershipArray; 1270 return membershipArray;
1258 } 1271 }
1259 1272
1273
1260 private void SendAgentDataUpdate(IClientAPI remoteClient, UUID dataForAgentID, UUID activeGroupID, string activeGroupName, ulong activeGroupPowers, string activeGroupTitle) 1274 private void SendAgentDataUpdate(IClientAPI remoteClient, UUID dataForAgentID, UUID activeGroupID, string activeGroupName, ulong activeGroupPowers, string activeGroupTitle)
1261 { 1275 {
1262 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 1276 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);