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/Environment/Modules/Avatar/Currency | |
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/Environment/Modules/Avatar/Currency')
-rw-r--r-- | OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs | 7 |
1 files changed, 4 insertions, 3 deletions
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; | |||
39 | using OpenSim.Framework; | 39 | using OpenSim.Framework; |
40 | using OpenSim.Region.Environment.Interfaces; | 40 | using OpenSim.Region.Environment.Interfaces; |
41 | using OpenSim.Region.Environment.Scenes; | 41 | using OpenSim.Region.Environment.Scenes; |
42 | using OpenSim.Framework.Communications.Cache; | ||
42 | 43 | ||
43 | namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney | 44 | namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney |
44 | { | 45 | { |
@@ -589,10 +590,10 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney | |||
589 | { | 590 | { |
590 | // try avatar username surname | 591 | // try avatar username surname |
591 | Scene scene = GetRandomScene(); | 592 | Scene scene = GetRandomScene(); |
592 | UserProfileData profile = scene.CommsManager.UserService.GetUserProfile(agentID); | 593 | CachedUserInfo profile = scene.CommsManager.UserProfileCacheService.GetUserDetails(agentID); |
593 | if (profile != null) | 594 | if (profile != null && profile.UserProfile != null) |
594 | { | 595 | { |
595 | string avatarname = profile.FirstName + " " + profile.SurName; | 596 | string avatarname = profile.UserProfile.FirstName + " " + profile.UserProfile.SurName; |
596 | return avatarname; | 597 | return avatarname; |
597 | } | 598 | } |
598 | return String.Empty; | 599 | return String.Empty; |