diff options
author | Dr Scofield | 2008-07-04 10:19:58 +0000 |
---|---|---|
committer | Dr Scofield | 2008-07-04 10:19:58 +0000 |
commit | 2dadbc2f70313899f517c8d1e1c7da443fd4324a (patch) | |
tree | 73dc9452c6a69488a7970ece23fb30dc7eb10849 /OpenSim/Framework/Communications/UserManagerBase.cs | |
parent | The new llScript-cs parser. Thanks Mike (diff) | |
download | opensim-SC_OLD-2dadbc2f70313899f517c8d1e1c7da443fd4324a.zip opensim-SC_OLD-2dadbc2f70313899f517c8d1e1c7da443fd4324a.tar.gz opensim-SC_OLD-2dadbc2f70313899f517c8d1e1c7da443fd4324a.tar.bz2 opensim-SC_OLD-2dadbc2f70313899f517c8d1e1c7da443fd4324a.tar.xz |
mini-warnings-safari, plus cleanup of IUserServices method naming.
Diffstat (limited to 'OpenSim/Framework/Communications/UserManagerBase.cs')
-rw-r--r-- | OpenSim/Framework/Communications/UserManagerBase.cs | 102 |
1 files changed, 52 insertions, 50 deletions
diff --git a/OpenSim/Framework/Communications/UserManagerBase.cs b/OpenSim/Framework/Communications/UserManagerBase.cs index 1e059fe..d5b1e74 100644 --- a/OpenSim/Framework/Communications/UserManagerBase.cs +++ b/OpenSim/Framework/Communications/UserManagerBase.cs | |||
@@ -96,7 +96,7 @@ namespace OpenSim.Framework.Communications | |||
96 | 96 | ||
97 | if (profile != null) | 97 | if (profile != null) |
98 | { | 98 | { |
99 | profile.CurrentAgent = getUserAgent(profile.ID); | 99 | profile.CurrentAgent = GetUserAgent(profile.ID); |
100 | return profile; | 100 | return profile; |
101 | } | 101 | } |
102 | } | 102 | } |
@@ -126,7 +126,7 @@ namespace OpenSim.Framework.Communications | |||
126 | 126 | ||
127 | if (null != profile) | 127 | if (null != profile) |
128 | { | 128 | { |
129 | profile.CurrentAgent = getUserAgent(profile.ID); | 129 | profile.CurrentAgent = GetUserAgent(profile.ID); |
130 | return profile; | 130 | return profile; |
131 | } | 131 | } |
132 | } | 132 | } |
@@ -157,7 +157,7 @@ namespace OpenSim.Framework.Communications | |||
157 | /// </summary> | 157 | /// </summary> |
158 | /// <param name="data"></param> | 158 | /// <param name="data"></param> |
159 | /// <returns></returns> | 159 | /// <returns></returns> |
160 | public bool setUserProfile(UserProfileData data) | 160 | public bool SetUserProfile(UserProfileData data) |
161 | { | 161 | { |
162 | foreach (KeyValuePair<string, IUserData> plugin in _plugins) | 162 | foreach (KeyValuePair<string, IUserData> plugin in _plugins) |
163 | { | 163 | { |
@@ -183,7 +183,7 @@ namespace OpenSim.Framework.Communications | |||
183 | /// </summary> | 183 | /// </summary> |
184 | /// <param name="uuid">The agent's UUID</param> | 184 | /// <param name="uuid">The agent's UUID</param> |
185 | /// <returns>Agent profiles</returns> | 185 | /// <returns>Agent profiles</returns> |
186 | public UserAgentData getUserAgent(LLUUID uuid) | 186 | public UserAgentData GetUserAgent(LLUUID uuid) |
187 | { | 187 | { |
188 | foreach (KeyValuePair<string, IUserData> plugin in _plugins) | 188 | foreach (KeyValuePair<string, IUserData> plugin in _plugins) |
189 | { | 189 | { |
@@ -200,6 +200,51 @@ namespace OpenSim.Framework.Communications | |||
200 | return null; | 200 | return null; |
201 | } | 201 | } |
202 | 202 | ||
203 | /// <summary> | ||
204 | /// Loads a user agent by name (not called directly) | ||
205 | /// </summary> | ||
206 | /// <param name="name">The agent's name</param> | ||
207 | /// <returns>A user agent</returns> | ||
208 | public UserAgentData GetUserAgent(string name) | ||
209 | { | ||
210 | foreach (KeyValuePair<string, IUserData> plugin in _plugins) | ||
211 | { | ||
212 | try | ||
213 | { | ||
214 | return plugin.Value.GetAgentByName(name); | ||
215 | } | ||
216 | catch (Exception e) | ||
217 | { | ||
218 | m_log.Info("[USERSTORAGE]: Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); | ||
219 | } | ||
220 | } | ||
221 | |||
222 | return null; | ||
223 | } | ||
224 | |||
225 | /// <summary> | ||
226 | /// Loads a user agent by name (not called directly) | ||
227 | /// </summary> | ||
228 | /// <param name="fname">The agent's firstname</param> | ||
229 | /// <param name="lname">The agent's lastname</param> | ||
230 | /// <returns>A user agent</returns> | ||
231 | public UserAgentData GetUserAgent(string fname, string lname) | ||
232 | { | ||
233 | foreach (KeyValuePair<string, IUserData> plugin in _plugins) | ||
234 | { | ||
235 | try | ||
236 | { | ||
237 | return plugin.Value.GetAgentByName(fname, lname); | ||
238 | } | ||
239 | catch (Exception e) | ||
240 | { | ||
241 | m_log.Info("[USERSTORAGE]: Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); | ||
242 | } | ||
243 | } | ||
244 | |||
245 | return null; | ||
246 | } | ||
247 | |||
203 | public void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid, ulong regionhandle) | 248 | public void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid, ulong regionhandle) |
204 | { | 249 | { |
205 | foreach (KeyValuePair<string, IUserData> plugin in _plugins) | 250 | foreach (KeyValuePair<string, IUserData> plugin in _plugins) |
@@ -297,62 +342,19 @@ namespace OpenSim.Framework.Communications | |||
297 | } | 342 | } |
298 | } | 343 | } |
299 | 344 | ||
300 | /// <summary> | ||
301 | /// Loads a user agent by name (not called directly) | ||
302 | /// </summary> | ||
303 | /// <param name="name">The agent's name</param> | ||
304 | /// <returns>A user agent</returns> | ||
305 | public UserAgentData getUserAgent(string name) | ||
306 | { | ||
307 | foreach (KeyValuePair<string, IUserData> plugin in _plugins) | ||
308 | { | ||
309 | try | ||
310 | { | ||
311 | return plugin.Value.GetAgentByName(name); | ||
312 | } | ||
313 | catch (Exception e) | ||
314 | { | ||
315 | m_log.Info("[USERSTORAGE]: Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); | ||
316 | } | ||
317 | } | ||
318 | |||
319 | return null; | ||
320 | } | ||
321 | 345 | ||
322 | /// <summary> | 346 | /// <summary> |
323 | /// Resets the currentAgent in the user profile | 347 | /// Resets the currentAgent in the user profile |
324 | /// </summary> | 348 | /// </summary> |
325 | /// <param name="agentID">The agent's ID</param> | 349 | /// <param name="agentID">The agent's ID</param> |
326 | public void clearUserAgent(LLUUID agentID) | 350 | public void ClearUserAgent(LLUUID agentID) |
327 | { | 351 | { |
328 | UserProfileData profile = GetUserProfile(agentID); | 352 | UserProfileData profile = GetUserProfile(agentID); |
329 | profile.CurrentAgent = null; | 353 | profile.CurrentAgent = null; |
330 | 354 | ||
331 | setUserProfile(profile); | 355 | SetUserProfile(profile); |
332 | } | 356 | } |
333 | 357 | ||
334 | /// <summary> | ||
335 | /// Loads a user agent by name (not called directly) | ||
336 | /// </summary> | ||
337 | /// <param name="fname">The agent's firstname</param> | ||
338 | /// <param name="lname">The agent's lastname</param> | ||
339 | /// <returns>A user agent</returns> | ||
340 | public UserAgentData getUserAgent(string fname, string lname) | ||
341 | { | ||
342 | foreach (KeyValuePair<string, IUserData> plugin in _plugins) | ||
343 | { | ||
344 | try | ||
345 | { | ||
346 | return plugin.Value.GetAgentByName(fname, lname); | ||
347 | } | ||
348 | catch (Exception e) | ||
349 | { | ||
350 | m_log.Info("[USERSTORAGE]: Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); | ||
351 | } | ||
352 | } | ||
353 | |||
354 | return null; | ||
355 | } | ||
356 | 358 | ||
357 | #endregion | 359 | #endregion |
358 | 360 | ||
@@ -537,7 +539,7 @@ namespace OpenSim.Framework.Communications | |||
537 | // TODO: what is the logic should be? | 539 | // TODO: what is the logic should be? |
538 | bool ret = false; | 540 | bool ret = false; |
539 | ret = AddUserAgent(profile.CurrentAgent); | 541 | ret = AddUserAgent(profile.CurrentAgent); |
540 | ret = ret & setUserProfile(profile); | 542 | ret = ret & SetUserProfile(profile); |
541 | return ret; | 543 | return ret; |
542 | } | 544 | } |
543 | 545 | ||