aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups')
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs36
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs1
2 files changed, 27 insertions, 10 deletions
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
index 68e6497..93c2d09 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)
@@ -652,7 +654,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
652 List<GroupRolesData> data = m_groupData.GetGroupRoles(GetClientGroupRequestID(remoteClient), groupID); 654 List<GroupRolesData> data = m_groupData.GetGroupRoles(GetClientGroupRequestID(remoteClient), groupID);
653 655
654 return data; 656 return data;
655
656 } 657 }
657 658
658 public List<GroupRoleMembersData> GroupRoleMembersRequest(IClientAPI remoteClient, UUID groupID) 659 public List<GroupRoleMembersData> GroupRoleMembersRequest(IClientAPI remoteClient, UUID groupID)
@@ -662,8 +663,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
662 List<GroupRoleMembersData> data = m_groupData.GetGroupRoleMembers(GetClientGroupRequestID(remoteClient), groupID); 663 List<GroupRoleMembersData> data = m_groupData.GetGroupRoleMembers(GetClientGroupRequestID(remoteClient), groupID);
663 664
664 return data; 665 return data;
665
666
667 } 666 }
668 667
669 public GroupProfileData GroupProfileRequest(IClientAPI remoteClient, UUID groupID) 668 public GroupProfileData GroupProfileRequest(IClientAPI remoteClient, UUID groupID)
@@ -746,7 +745,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
746 return UUID.Zero; 745 return UUID.Zero;
747 } 746 }
748 // is there is a money module present ? 747 // is there is a money module present ?
749 IMoneyModule money=remoteClient.Scene.RequestModuleInterface<IMoneyModule>(); 748 IMoneyModule money = remoteClient.Scene.RequestModuleInterface<IMoneyModule>();
750 if (money != null) 749 if (money != null)
751 { 750 {
752 // do the transaction, that is if the agent has got sufficient funds 751 // do the transaction, that is if the agent has got sufficient funds
@@ -766,6 +765,25 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
766 return groupID; 765 return groupID;
767 } 766 }
768 767
768 public DirGroupsReplyData? GetGroup(string name)
769 {
770 if (m_debugEnabled)
771 m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
772
773 List<DirGroupsReplyData> groups = m_groupData.FindGroups(null, name);
774
775 DirGroupsReplyData? foundGroup = null;
776
777 foreach (DirGroupsReplyData group in groups)
778 {
779 // We must have an exact match - I believe FindGroups will return partial matches
780 if (group.groupName == name)
781 foundGroup = group;
782 }
783
784 return foundGroup;
785 }
786
769 public GroupNoticeData[] GroupNoticesListRequest(IClientAPI remoteClient, UUID groupID) 787 public GroupNoticeData[] GroupNoticesListRequest(IClientAPI remoteClient, UUID groupID)
770 { 788 {
771 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 789 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs
index 964d0bb..2115376 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs
@@ -470,7 +470,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
470 XmlRpcCall(requestID, "groups.removeAgentFromGroupRole", param); 470 XmlRpcCall(requestID, "groups.removeAgentFromGroupRole", param);
471 } 471 }
472 472
473
474 public List<DirGroupsReplyData> FindGroups(GroupRequestID requestID, string search) 473 public List<DirGroupsReplyData> FindGroups(GroupRequestID requestID, string search)
475 { 474 {
476 Hashtable param = new Hashtable(); 475 Hashtable param = new Hashtable();