aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules
diff options
context:
space:
mode:
authorMelanie Thielker2008-08-16 02:00:36 +0000
committerMelanie Thielker2008-08-16 02:00:36 +0000
commit328ab79b783d4beaa5f954918e3b306950153c1a (patch)
treee2bf03b6cc7c6514a9c83968a716648394602e14 /OpenSim/Region/Environment/Modules
parentPerils of copypaste. Missing references. (diff)
downloadopensim-SC_OLD-328ab79b783d4beaa5f954918e3b306950153c1a.zip
opensim-SC_OLD-328ab79b783d4beaa5f954918e3b306950153c1a.tar.gz
opensim-SC_OLD-328ab79b783d4beaa5f954918e3b306950153c1a.tar.bz2
opensim-SC_OLD-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')
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs7
-rw-r--r--OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs4
2 files changed, 7 insertions, 4 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;
39using OpenSim.Framework; 39using OpenSim.Framework;
40using OpenSim.Region.Environment.Interfaces; 40using OpenSim.Region.Environment.Interfaces;
41using OpenSim.Region.Environment.Scenes; 41using OpenSim.Region.Environment.Scenes;
42using OpenSim.Framework.Communications.Cache;
42 43
43namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney 44namespace 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;
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs
index e6597c3..1340f8b 100644
--- a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs
+++ b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs
@@ -29,6 +29,7 @@ using OpenSim.Framework;
29using OpenSim.Region.Environment.Scenes; 29using OpenSim.Region.Environment.Scenes;
30using OpenSim.Region.Environment.Modules.World.Serialiser; 30using OpenSim.Region.Environment.Modules.World.Serialiser;
31using OpenSim.Region.Environment.Modules.World.Terrain; 31using OpenSim.Region.Environment.Modules.World.Terrain;
32using OpenSim.Framework.Communications.Cache;
32using System; 33using System;
33using Axiom.Math; 34using Axiom.Math;
34using System.Collections.Generic; 35using System.Collections.Generic;
@@ -187,7 +188,8 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
187 { 188 {
188 if (!m_validUserUuids.ContainsKey(uuid)) 189 if (!m_validUserUuids.ContainsKey(uuid))
189 { 190 {
190 if (m_scene.CommsManager.UserService.GetUserProfile(uuid) != null) 191 CachedUserInfo profile = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(uuid);
192 if (profile != null && profile.UserProfile != null)
191 m_validUserUuids.Add(uuid, true); 193 m_validUserUuids.Add(uuid, true);
192 else 194 else
193 m_validUserUuids.Add(uuid, false); 195 m_validUserUuids.Add(uuid, false);