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. --- .../ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs') 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; using System.Collections.Generic; using libsecondlife; using OpenSim.Framework; +using OpenSim.Framework.Communications.Cache; using OpenSim.Region.Environment.Scenes; using OpenSim.Region.ScriptEngine.Shared; using OpenSim.Region.ScriptEngine.Shared.Api; @@ -263,10 +264,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins 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