diff options
author | Melanie Thielker | 2008-08-16 02:00:36 +0000 |
---|---|---|
committer | Melanie Thielker | 2008-08-16 02:00:36 +0000 |
commit | 328ab79b783d4beaa5f954918e3b306950153c1a (patch) | |
tree | e2bf03b6cc7c6514a9c83968a716648394602e14 /OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins | |
parent | Perils of copypaste. Missing references. (diff) | |
download | opensim-SC-328ab79b783d4beaa5f954918e3b306950153c1a.zip opensim-SC-328ab79b783d4beaa5f954918e3b306950153c1a.tar.gz opensim-SC-328ab79b783d4beaa5f954918e3b306950153c1a.tar.bz2 opensim-SC-328ab79b783d4beaa5f954918e3b306950153c1a.tar.xz |
Refactor a lot of direct calls to OGS1 to use the cached version instead.
Scripts can now no longer DOS the user server and there are a lot fewer
gratuitious lookups of user profile data.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs index 5833512..eaf4bd0 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs | |||
@@ -29,6 +29,7 @@ using System; | |||
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using libsecondlife; | 30 | using libsecondlife; |
31 | using OpenSim.Framework; | 31 | using OpenSim.Framework; |
32 | using OpenSim.Framework.Communications.Cache; | ||
32 | using OpenSim.Region.Environment.Scenes; | 33 | using OpenSim.Region.Environment.Scenes; |
33 | using OpenSim.Region.ScriptEngine.Shared; | 34 | using OpenSim.Region.ScriptEngine.Shared; |
34 | using OpenSim.Region.ScriptEngine.Shared.Api; | 35 | using OpenSim.Region.ScriptEngine.Shared.Api; |
@@ -263,10 +264,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
263 | string entname =ent.Name; | 264 | string entname =ent.Name; |
264 | 265 | ||
265 | // try avatar username surname | 266 | // try avatar username surname |
266 | UserProfileData profile = m_CmdManager.m_ScriptEngine.World.CommsManager.UserService.GetUserProfile(ent.UUID); | 267 | CachedUserInfo profile = m_CmdManager.m_ScriptEngine.World.CommsManager.UserProfileCacheService.GetUserDetails(ent.UUID); |
267 | if (profile != null) | 268 | if (profile != null && profile.UserProfile != null) |
268 | { | 269 | { |
269 | avatarname = profile.FirstName + " " + profile.SurName; | 270 | avatarname = profile.UserProfile.FirstName + " " + profile.UserProfile.SurName; |
270 | } | 271 | } |
271 | // try an scene object | 272 | // try an scene object |
272 | SceneObjectPart SOP = m_CmdManager.m_ScriptEngine.World.GetSceneObjectPart(ent.UUID); | 273 | SceneObjectPart SOP = m_CmdManager.m_ScriptEngine.World.GetSceneObjectPart(ent.UUID); |