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(+) 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