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. --- .../Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney') diff --git a/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs index 0d22ab9..f038975 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs @@ -39,6 +39,7 @@ using Nwc.XmlRpc; using OpenSim.Framework; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Scenes; +using OpenSim.Framework.Communications.Cache; namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney { @@ -589,10 +590,10 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney { // try avatar username surname Scene scene = GetRandomScene(); - UserProfileData profile = scene.CommsManager.UserService.GetUserProfile(agentID); - if (profile != null) + CachedUserInfo profile = scene.CommsManager.UserProfileCacheService.GetUserDetails(agentID); + if (profile != null && profile.UserProfile != null) { - string avatarname = profile.FirstName + " " + profile.SurName; + string avatarname = profile.UserProfile.FirstName + " " + profile.UserProfile.SurName; return avatarname; } return String.Empty; -- cgit v1.1