diff options
author | Diva Canto | 2013-07-28 13:49:58 -0700 |
---|---|---|
committer | Diva Canto | 2013-07-28 13:49:58 -0700 |
commit | 7b0b5c9d97dea840e1ede6e2318b3c049c804983 (patch) | |
tree | 75dda682cc5e0d770068914ea36d68209c429dc0 /OpenSim/Addons/Groups | |
parent | This makes people search work. (diff) | |
download | opensim-SC_OLD-7b0b5c9d97dea840e1ede6e2318b3c049c804983.zip opensim-SC_OLD-7b0b5c9d97dea840e1ede6e2318b3c049c804983.tar.gz opensim-SC_OLD-7b0b5c9d97dea840e1ede6e2318b3c049c804983.tar.bz2 opensim-SC_OLD-7b0b5c9d97dea840e1ede6e2318b3c049c804983.tar.xz |
Added BasicSearchModule.cs which handles OnDirFindQuery events. Removed that handler from both Groups modules in core, and replaced them with an operation on IGroupsModule.
Diffstat (limited to 'OpenSim/Addons/Groups')
-rw-r--r-- | OpenSim/Addons/Groups/GroupsModule.cs | 27 |
1 files changed, 6 insertions, 21 deletions
diff --git a/OpenSim/Addons/Groups/GroupsModule.cs b/OpenSim/Addons/Groups/GroupsModule.cs index 7d3c064..214a131 100644 --- a/OpenSim/Addons/Groups/GroupsModule.cs +++ b/OpenSim/Addons/Groups/GroupsModule.cs | |||
@@ -197,6 +197,7 @@ namespace OpenSim.Groups | |||
197 | 197 | ||
198 | scene.EventManager.OnNewClient -= OnNewClient; | 198 | scene.EventManager.OnNewClient -= OnNewClient; |
199 | scene.EventManager.OnMakeRootAgent -= OnMakeRoot; | 199 | scene.EventManager.OnMakeRootAgent -= OnMakeRoot; |
200 | scene.EventManager.OnMakeChildAgent -= OnMakeChild; | ||
200 | scene.EventManager.OnIncomingInstantMessage -= OnGridInstantMessage; | 201 | scene.EventManager.OnIncomingInstantMessage -= OnGridInstantMessage; |
201 | 202 | ||
202 | lock (m_sceneList) | 203 | lock (m_sceneList) |
@@ -244,7 +245,6 @@ namespace OpenSim.Groups | |||
244 | if (m_debugEnabled) m_log.DebugFormat("[Groups]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); | 245 | if (m_debugEnabled) m_log.DebugFormat("[Groups]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); |
245 | 246 | ||
246 | sp.ControllingClient.OnUUIDGroupNameRequest += HandleUUIDGroupNameRequest; | 247 | sp.ControllingClient.OnUUIDGroupNameRequest += HandleUUIDGroupNameRequest; |
247 | sp.ControllingClient.OnDirFindQuery += OnDirFindQuery; | ||
248 | // Used for Notices and Group Invites/Accept/Reject | 248 | // Used for Notices and Group Invites/Accept/Reject |
249 | sp.ControllingClient.OnInstantMessage += OnInstantMessage; | 249 | sp.ControllingClient.OnInstantMessage += OnInstantMessage; |
250 | 250 | ||
@@ -257,7 +257,6 @@ namespace OpenSim.Groups | |||
257 | if (m_debugEnabled) m_log.DebugFormat("[Groups]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); | 257 | if (m_debugEnabled) m_log.DebugFormat("[Groups]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); |
258 | 258 | ||
259 | sp.ControllingClient.OnUUIDGroupNameRequest -= HandleUUIDGroupNameRequest; | 259 | sp.ControllingClient.OnUUIDGroupNameRequest -= HandleUUIDGroupNameRequest; |
260 | sp.ControllingClient.OnDirFindQuery -= OnDirFindQuery; | ||
261 | // Used for Notices and Group Invites/Accept/Reject | 260 | // Used for Notices and Group Invites/Accept/Reject |
262 | sp.ControllingClient.OnInstantMessage -= OnInstantMessage; | 261 | sp.ControllingClient.OnInstantMessage -= OnInstantMessage; |
263 | } | 262 | } |
@@ -305,25 +304,6 @@ namespace OpenSim.Groups | |||
305 | } | 304 | } |
306 | */ | 305 | */ |
307 | 306 | ||
308 | void OnDirFindQuery(IClientAPI remoteClient, UUID queryID, string queryText, uint queryFlags, int queryStart) | ||
309 | { | ||
310 | if (((DirFindFlags)queryFlags & DirFindFlags.Groups) == DirFindFlags.Groups) | ||
311 | { | ||
312 | if (m_debugEnabled) | ||
313 | m_log.DebugFormat( | ||
314 | "[Groups]: {0} called with queryText({1}) queryFlags({2}) queryStart({3})", | ||
315 | System.Reflection.MethodBase.GetCurrentMethod().Name, queryText, (DirFindFlags)queryFlags, queryStart); | ||
316 | |||
317 | |||
318 | if (string.IsNullOrEmpty(queryText)) | ||
319 | remoteClient.SendDirGroupsReply(queryID, new DirGroupsReplyData[0]); | ||
320 | |||
321 | // TODO: This currently ignores pretty much all the query flags including Mature and sort order | ||
322 | remoteClient.SendDirGroupsReply(queryID, m_groupData.FindGroups(GetRequestingAgentIDStr(remoteClient), queryText).ToArray()); | ||
323 | } | ||
324 | |||
325 | } | ||
326 | |||
327 | private void OnAgentDataUpdateRequest(IClientAPI remoteClient, UUID dataForAgentID, UUID sessionID) | 307 | private void OnAgentDataUpdateRequest(IClientAPI remoteClient, UUID dataForAgentID, UUID sessionID) |
328 | { | 308 | { |
329 | if (m_debugEnabled) m_log.DebugFormat("[Groups]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); | 309 | if (m_debugEnabled) m_log.DebugFormat("[Groups]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); |
@@ -1211,6 +1191,11 @@ namespace OpenSim.Groups | |||
1211 | } | 1191 | } |
1212 | } | 1192 | } |
1213 | 1193 | ||
1194 | public List<DirGroupsReplyData> FindGroups(IClientAPI remoteClient, string query) | ||
1195 | { | ||
1196 | return m_groupData.FindGroups(GetRequestingAgentIDStr(remoteClient), query); | ||
1197 | } | ||
1198 | |||
1214 | #endregion | 1199 | #endregion |
1215 | 1200 | ||
1216 | #region Client/Update Tools | 1201 | #region Client/Update Tools |