diff options
author | Justin Clarke Casey | 2009-04-17 17:22:58 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2009-04-17 17:22:58 +0000 |
commit | be1855f163b32d3644f95c1d017fc6db350cb9af (patch) | |
tree | 02838d68c6e8edc6ec1fc69589c1726bb837ed5d /OpenSim/Region/ScriptEngine/Shared/Api | |
parent | Add copyright header. (diff) | |
download | opensim-SC_OLD-be1855f163b32d3644f95c1d017fc6db350cb9af.zip opensim-SC_OLD-be1855f163b32d3644f95c1d017fc6db350cb9af.tar.gz opensim-SC_OLD-be1855f163b32d3644f95c1d017fc6db350cb9af.tar.bz2 opensim-SC_OLD-be1855f163b32d3644f95c1d017fc6db350cb9af.tar.xz |
* Use cached user profiles in osAvatarName2Key()
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 36c1639..0cfa61d 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -35,6 +35,7 @@ using OpenMetaverse; | |||
35 | using Nini.Config; | 35 | using Nini.Config; |
36 | using OpenSim; | 36 | using OpenSim; |
37 | using OpenSim.Framework; | 37 | using OpenSim.Framework; |
38 | using OpenSim.Framework.Communications.Cache; | ||
38 | using OpenSim.Framework.Console; | 39 | using OpenSim.Framework.Console; |
39 | using OpenSim.Region.Framework.Interfaces; | 40 | using OpenSim.Region.Framework.Interfaces; |
40 | using OpenSim.Region.Framework.Scenes; | 41 | using OpenSim.Region.Framework.Scenes; |
@@ -1348,15 +1349,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1348 | { | 1349 | { |
1349 | CheckThreatLevel(ThreatLevel.Low, "osAvatarName2Key"); | 1350 | CheckThreatLevel(ThreatLevel.Low, "osAvatarName2Key"); |
1350 | 1351 | ||
1351 | UserProfileData UserProfile = World.CommsManager.UserService | 1352 | CachedUserInfo userInfo = World.CommsManager.UserProfileCacheService.GetUserDetails(firstname, lastname); |
1352 | .GetUserProfile(firstname, lastname); | 1353 | |
1353 | if (UserProfile==null) | 1354 | if (null == userInfo) |
1354 | { | 1355 | { |
1355 | return UUID.Zero.ToString(); | 1356 | return UUID.Zero.ToString(); |
1356 | } | 1357 | } |
1357 | else | 1358 | else |
1358 | { | 1359 | { |
1359 | return UserProfile.ID.ToString(); | 1360 | return userInfo.UserProfile.ID.ToString(); |
1360 | } | 1361 | } |
1361 | } | 1362 | } |
1362 | 1363 | ||