From 328ab79b783d4beaa5f954918e3b306950153c1a Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sat, 16 Aug 2008 02:00:36 +0000 Subject: 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. --- .../Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Common/ScriptEngineBase') diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs index aaea2ee..9b636fd 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs @@ -30,6 +30,7 @@ using System.Collections.Generic; using libsecondlife; using OpenSim.Framework; using OpenSim.Region.Environment.Scenes; +using OpenSim.Framework.Communications.Cache; namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins { @@ -272,10 +273,10 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin string entname =ent.Name; // try avatar username surname - UserProfileData profile = m_CmdManager.m_ScriptEngine.World.CommsManager.UserService.GetUserProfile(ent.UUID); - if (profile != null) + CachedUserInfo profile = m_CmdManager.m_ScriptEngine.World.CommsManager.UserProfileCacheService.GetUserDetails(ent.UUID); + if (profile != null && profile.UserProfile != null) { - avatarname = profile.FirstName + " " + profile.SurName; + avatarname = profile.UserProfile.FirstName + " " + profile.UserProfile.SurName; } // try an scene object SceneObjectPart SOP = m_CmdManager.m_ScriptEngine.World.GetSceneObjectPart(ent.UUID); -- cgit v1.1