From 0f3f2e1dc007f48dcccb27932923a8d586eedb5f Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 13 Aug 2009 13:19:12 +0100 Subject: Add reference to the profile module in the avatar profiles handler, plus an example of how to override legacy core data with data retrieved from the profile module --- .../Region/CoreModules/Avatar/Profiles/AvatarProfilesModule.cs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'OpenSim/Region/CoreModules') diff --git a/OpenSim/Region/CoreModules/Avatar/Profiles/AvatarProfilesModule.cs b/OpenSim/Region/CoreModules/Avatar/Profiles/AvatarProfilesModule.cs index d3324e4..a6ace63 100644 --- a/OpenSim/Region/CoreModules/Avatar/Profiles/AvatarProfilesModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Profiles/AvatarProfilesModule.cs @@ -41,6 +41,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Profiles { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private Scene m_scene; + private IProfileModule m_profileModule = null; public AvatarProfilesModule() { @@ -56,6 +57,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Profiles public void PostInitialise() { + m_profileModule = scene.RequestModuleInterface(); } public void Close() @@ -108,6 +110,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Profiles charterMember = Utils.StringToBytes(profile.CustomType); } + if (m_profileModule != null) + { + Hashtable profileData = m_profileModule.GetProfileData(remoteClient.AgentId); + if (profileData["ProfileUrl"] != null) + profile.ProfileUrl = profileData["ProfileUrl"].ToString(); + } remoteClient.SendAvatarProperties(profile.ID, profile.AboutText, Util.ToDateTime(profile.Created).ToString("M/d/yyyy", CultureInfo.InvariantCulture), charterMember, profile.FirstLifeAboutText, (uint)(profile.UserFlags & 0xff), -- cgit v1.1 From 3669115d60f4e8fbd5032836b828f6ee40901c93 Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 13 Aug 2009 13:25:33 +0100 Subject: Some small fixes --- OpenSim/Region/CoreModules/Avatar/Profiles/AvatarProfilesModule.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/CoreModules') diff --git a/OpenSim/Region/CoreModules/Avatar/Profiles/AvatarProfilesModule.cs b/OpenSim/Region/CoreModules/Avatar/Profiles/AvatarProfilesModule.cs index a6ace63..0f58788 100644 --- a/OpenSim/Region/CoreModules/Avatar/Profiles/AvatarProfilesModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Profiles/AvatarProfilesModule.cs @@ -26,6 +26,7 @@ */ using System; +using System.Collections; using System.Globalization; using System.Reflection; using log4net; @@ -57,7 +58,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Profiles public void PostInitialise() { - m_profileModule = scene.RequestModuleInterface(); + m_profileModule = m_scene.RequestModuleInterface(); } public void Close() -- cgit v1.1