diff options
author | Diva Canto | 2013-07-28 09:00:28 -0700 |
---|---|---|
committer | Diva Canto | 2013-07-28 09:00:28 -0700 |
commit | 170a6f0563c9b9e228dad0b1db5654f2114a05f4 (patch) | |
tree | 73d77710d77edb36e7efa0d1428a83fb941f0b1b /OpenSim/Addons/Groups/Remote/GroupsServiceRobustConnector.cs | |
parent | More on group chat: only root agents should subscribe to OnInstantMessage, or... (diff) | |
download | opensim-SC-170a6f0563c9b9e228dad0b1db5654f2114a05f4.zip opensim-SC-170a6f0563c9b9e228dad0b1db5654f2114a05f4.tar.gz opensim-SC-170a6f0563c9b9e228dad0b1db5654f2114a05f4.tar.bz2 opensim-SC-170a6f0563c9b9e228dad0b1db5654f2114a05f4.tar.xz |
This makes group search work (Groups V2).
Diffstat (limited to 'OpenSim/Addons/Groups/Remote/GroupsServiceRobustConnector.cs')
-rw-r--r-- | OpenSim/Addons/Groups/Remote/GroupsServiceRobustConnector.cs | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/OpenSim/Addons/Groups/Remote/GroupsServiceRobustConnector.cs b/OpenSim/Addons/Groups/Remote/GroupsServiceRobustConnector.cs index 106c6c4..249d974 100644 --- a/OpenSim/Addons/Groups/Remote/GroupsServiceRobustConnector.cs +++ b/OpenSim/Addons/Groups/Remote/GroupsServiceRobustConnector.cs | |||
@@ -133,6 +133,8 @@ namespace OpenSim.Groups | |||
133 | return HandleAddNotice(request); | 133 | return HandleAddNotice(request); |
134 | case "GETNOTICES": | 134 | case "GETNOTICES": |
135 | return HandleGetNotices(request); | 135 | return HandleGetNotices(request); |
136 | case "FINDGROUPS": | ||
137 | return HandleFindGroups(request); | ||
136 | } | 138 | } |
137 | m_log.DebugFormat("[GROUPS HANDLER]: unknown method request: {0}", method); | 139 | m_log.DebugFormat("[GROUPS HANDLER]: unknown method request: {0}", method); |
138 | } | 140 | } |
@@ -740,6 +742,32 @@ namespace OpenSim.Groups | |||
740 | return Util.UTF8NoBomEncoding.GetBytes(xmlString); | 742 | return Util.UTF8NoBomEncoding.GetBytes(xmlString); |
741 | } | 743 | } |
742 | 744 | ||
745 | byte[] HandleFindGroups(Dictionary<string, object> request) | ||
746 | { | ||
747 | Dictionary<string, object> result = new Dictionary<string, object>(); | ||
748 | |||
749 | if (!request.ContainsKey("RequestingAgentID") || !request.ContainsKey("Query")) | ||
750 | NullResult(result, "Bad network data"); | ||
751 | |||
752 | List<DirGroupsReplyData> hits = m_GroupsService.FindGroups(request["RequestingAgentID"].ToString(), request["Query"].ToString()); | ||
753 | |||
754 | if (hits == null || (hits != null && hits.Count == 0)) | ||
755 | NullResult(result, "No hits"); | ||
756 | else | ||
757 | { | ||
758 | Dictionary<string, object> dict = new Dictionary<string, object>(); | ||
759 | int i = 0; | ||
760 | foreach (DirGroupsReplyData n in hits) | ||
761 | dict["n-" + i++] = GroupsDataUtils.DirGroupsReplyData(n); | ||
762 | |||
763 | result["RESULT"] = dict; | ||
764 | } | ||
765 | |||
766 | |||
767 | string xmlString = ServerUtils.BuildXmlResponse(result); | ||
768 | return Util.UTF8NoBomEncoding.GetBytes(xmlString); | ||
769 | } | ||
770 | |||
743 | 771 | ||
744 | #region Helpers | 772 | #region Helpers |
745 | 773 | ||