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.
This commit is contained in:
Melanie Thielker
2008-08-16 02:00:36 +00:00
parent 437b4a8aaa
commit 328ab79b78
9 changed files with 63 additions and 38 deletions

View File

@@ -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);