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/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs | |
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/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs index 295ad64..7adb203 100644 --- a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs +++ b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs | |||
@@ -100,8 +100,6 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement | |||
100 | scene.RegisterModuleInterface<IPeople>(this); | 100 | scene.RegisterModuleInterface<IPeople>(this); |
101 | scene.EventManager.OnNewClient += new EventManager.OnNewClientDelegate(EventManager_OnNewClient); | 101 | scene.EventManager.OnNewClient += new EventManager.OnNewClientDelegate(EventManager_OnNewClient); |
102 | scene.EventManager.OnPrimsLoaded += new EventManager.PrimsLoaded(EventManager_OnPrimsLoaded); | 102 | scene.EventManager.OnPrimsLoaded += new EventManager.PrimsLoaded(EventManager_OnPrimsLoaded); |
103 | scene.EventManager.OnMakeRootAgent += new Action<ScenePresence>(EventManager_OnMakeRootAgent); | ||
104 | scene.EventManager.OnMakeChildAgent += new EventManager.OnMakeChildAgentDelegate(EventManager_OnMakeChildAgent); | ||
105 | } | 103 | } |
106 | } | 104 | } |
107 | 105 | ||
@@ -157,43 +155,6 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement | |||
157 | client.OnAvatarPickerRequest -= new AvatarPickerRequest(HandleAvatarPickerRequest); | 155 | client.OnAvatarPickerRequest -= new AvatarPickerRequest(HandleAvatarPickerRequest); |
158 | } | 156 | } |
159 | 157 | ||
160 | void EventManager_OnMakeRootAgent(ScenePresence sp) | ||
161 | { | ||
162 | sp.ControllingClient.OnDirFindQuery += OnDirFindQuery; | ||
163 | } | ||
164 | |||
165 | void EventManager_OnMakeChildAgent(ScenePresence sp) | ||
166 | { | ||
167 | sp.ControllingClient.OnDirFindQuery -= OnDirFindQuery; | ||
168 | } | ||
169 | |||
170 | void OnDirFindQuery(IClientAPI remoteClient, UUID queryID, string queryText, uint queryFlags, int queryStart) | ||
171 | { | ||
172 | if (((DirFindFlags)queryFlags & DirFindFlags.People) == DirFindFlags.People) | ||
173 | { | ||
174 | if (string.IsNullOrEmpty(queryText)) | ||
175 | remoteClient.SendDirPeopleReply(queryID, new DirPeopleReplyData[0]); | ||
176 | |||
177 | List<UserAccount> accounts = m_Scenes[0].UserAccountService.GetUserAccounts(m_Scenes[0].RegionInfo.ScopeID, queryText); | ||
178 | DirPeopleReplyData[] hits = new DirPeopleReplyData[accounts.Count]; | ||
179 | int i = 0; | ||
180 | foreach (UserAccount acc in accounts) | ||
181 | { | ||
182 | DirPeopleReplyData d = new DirPeopleReplyData(); | ||
183 | d.agentID = acc.PrincipalID; | ||
184 | d.firstName = acc.FirstName; | ||
185 | d.lastName = acc.LastName; | ||
186 | d.online = false; | ||
187 | |||
188 | hits[i++] = d; | ||
189 | } | ||
190 | |||
191 | // TODO: This currently ignores pretty much all the query flags including Mature and sort order | ||
192 | remoteClient.SendDirPeopleReply(queryID, hits); | ||
193 | } | ||
194 | |||
195 | } | ||
196 | |||
197 | void HandleUUIDNameRequest(UUID uuid, IClientAPI client) | 158 | void HandleUUIDNameRequest(UUID uuid, IClientAPI client) |
198 | { | 159 | { |
199 | // m_log.DebugFormat( | 160 | // m_log.DebugFormat( |