diff options
Diffstat (limited to 'OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs')
-rw-r--r-- | OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs | 34 |
1 files changed, 21 insertions, 13 deletions
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs index 68e6497..61c51e0 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs | |||
@@ -328,17 +328,19 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
328 | } | 328 | } |
329 | */ | 329 | */ |
330 | 330 | ||
331 | |||
332 | void OnDirFindQuery(IClientAPI remoteClient, UUID queryID, string queryText, uint queryFlags, int queryStart) | 331 | void OnDirFindQuery(IClientAPI remoteClient, UUID queryID, string queryText, uint queryFlags, int queryStart) |
333 | { | 332 | { |
334 | if (((DirFindFlags)queryFlags & DirFindFlags.Groups) == DirFindFlags.Groups) | 333 | if (((DirFindFlags)queryFlags & DirFindFlags.Groups) == DirFindFlags.Groups) |
335 | { | 334 | { |
336 | if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called with queryText({1}) queryFlags({2}) queryStart({3})", System.Reflection.MethodBase.GetCurrentMethod().Name, queryText, (DirFindFlags)queryFlags, queryStart); | 335 | if (m_debugEnabled) |
336 | m_log.DebugFormat( | ||
337 | "[GROUPS]: {0} called with queryText({1}) queryFlags({2}) queryStart({3})", | ||
338 | System.Reflection.MethodBase.GetCurrentMethod().Name, queryText, (DirFindFlags)queryFlags, queryStart); | ||
337 | 339 | ||
338 | // TODO: This currently ignores pretty much all the query flags including Mature and sort order | 340 | // TODO: This currently ignores pretty much all the query flags including Mature and sort order |
339 | remoteClient.SendDirGroupsReply(queryID, m_groupData.FindGroups(GetClientGroupRequestID(remoteClient), queryText).ToArray()); | 341 | remoteClient.SendDirGroupsReply( |
340 | } | 342 | queryID, m_groupData.FindGroups(GetClientGroupRequestID(remoteClient), queryText).ToArray()); |
341 | 343 | } | |
342 | } | 344 | } |
343 | 345 | ||
344 | private void OnAgentDataUpdateRequest(IClientAPI remoteClient, UUID dataForAgentID, UUID sessionID) | 346 | private void OnAgentDataUpdateRequest(IClientAPI remoteClient, UUID dataForAgentID, UUID sessionID) |
@@ -363,7 +365,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
363 | SendScenePresenceUpdate(dataForAgentID, activeGroupTitle); | 365 | SendScenePresenceUpdate(dataForAgentID, activeGroupTitle); |
364 | } | 366 | } |
365 | 367 | ||
366 | private void HandleUUIDGroupNameRequest(UUID GroupID,IClientAPI remoteClient) | 368 | private void HandleUUIDGroupNameRequest(UUID GroupID, IClientAPI remoteClient) |
367 | { | 369 | { |
368 | if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); | 370 | if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); |
369 | 371 | ||
@@ -593,6 +595,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
593 | return m_groupData.GetGroupRecord(null, GroupID, null); | 595 | return m_groupData.GetGroupRecord(null, GroupID, null); |
594 | } | 596 | } |
595 | 597 | ||
598 | public GroupRecord GetGroupRecord(string name) | ||
599 | { | ||
600 | return m_groupData.GetGroupRecord(null, UUID.Zero, name); | ||
601 | } | ||
602 | |||
596 | public void ActivateGroup(IClientAPI remoteClient, UUID groupID) | 603 | public void ActivateGroup(IClientAPI remoteClient, UUID groupID) |
597 | { | 604 | { |
598 | if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); | 605 | if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); |
@@ -652,7 +659,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
652 | List<GroupRolesData> data = m_groupData.GetGroupRoles(GetClientGroupRequestID(remoteClient), groupID); | 659 | List<GroupRolesData> data = m_groupData.GetGroupRoles(GetClientGroupRequestID(remoteClient), groupID); |
653 | 660 | ||
654 | return data; | 661 | return data; |
655 | |||
656 | } | 662 | } |
657 | 663 | ||
658 | public List<GroupRoleMembersData> GroupRoleMembersRequest(IClientAPI remoteClient, UUID groupID) | 664 | public List<GroupRoleMembersData> GroupRoleMembersRequest(IClientAPI remoteClient, UUID groupID) |
@@ -662,8 +668,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
662 | List<GroupRoleMembersData> data = m_groupData.GetGroupRoleMembers(GetClientGroupRequestID(remoteClient), groupID); | 668 | List<GroupRoleMembersData> data = m_groupData.GetGroupRoleMembers(GetClientGroupRequestID(remoteClient), groupID); |
663 | 669 | ||
664 | return data; | 670 | return data; |
665 | |||
666 | |||
667 | } | 671 | } |
668 | 672 | ||
669 | public GroupProfileData GroupProfileRequest(IClientAPI remoteClient, UUID groupID) | 673 | public GroupProfileData GroupProfileRequest(IClientAPI remoteClient, UUID groupID) |
@@ -712,7 +716,10 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
712 | 716 | ||
713 | public GroupMembershipData GetMembershipData(UUID groupID, UUID agentID) | 717 | public GroupMembershipData GetMembershipData(UUID groupID, UUID agentID) |
714 | { | 718 | { |
715 | if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); | 719 | if (m_debugEnabled) |
720 | m_log.DebugFormat( | ||
721 | "[GROUPS]: {0} called with groupID={1}, agentID={2}", | ||
722 | System.Reflection.MethodBase.GetCurrentMethod().Name, groupID, agentID); | ||
716 | 723 | ||
717 | return m_groupData.GetAgentGroupMembership(null, agentID, groupID); | 724 | return m_groupData.GetAgentGroupMembership(null, agentID, groupID); |
718 | } | 725 | } |
@@ -746,7 +753,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
746 | return UUID.Zero; | 753 | return UUID.Zero; |
747 | } | 754 | } |
748 | // is there is a money module present ? | 755 | // is there is a money module present ? |
749 | IMoneyModule money=remoteClient.Scene.RequestModuleInterface<IMoneyModule>(); | 756 | IMoneyModule money = remoteClient.Scene.RequestModuleInterface<IMoneyModule>(); |
750 | if (money != null) | 757 | if (money != null) |
751 | { | 758 | { |
752 | // do the transaction, that is if the agent has got sufficient funds | 759 | // do the transaction, that is if the agent has got sufficient funds |
@@ -1166,8 +1173,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
1166 | else | 1173 | else |
1167 | { | 1174 | { |
1168 | string domain = string.Empty; //m_sceneList[0].CommsManager.NetworkServersInfo.UserURL; | 1175 | string domain = string.Empty; //m_sceneList[0].CommsManager.NetworkServersInfo.UserURL; |
1169 | if (account.ServiceURLs["HomeURI"] != null) | 1176 | object homeUriObj; |
1170 | domain = account.ServiceURLs["HomeURI"].ToString(); | 1177 | if (account.ServiceURLs.TryGetValue("HomeURI", out homeUriObj) && homeUriObj != null) |
1178 | domain = homeUriObj.ToString(); | ||
1171 | // They're a local user, use this: | 1179 | // They're a local user, use this: |
1172 | info.RequestID.UserServiceURL = domain; | 1180 | info.RequestID.UserServiceURL = domain; |
1173 | } | 1181 | } |