aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Avatar/Profiles
diff options
context:
space:
mode:
authorMelanie2009-08-13 13:19:12 +0100
committerMelanie2009-08-13 13:19:12 +0100
commit0f3f2e1dc007f48dcccb27932923a8d586eedb5f (patch)
treeb4cc1e77e7fb37c2a7a77665d1a8b26acdcd33a4 /OpenSim/Region/CoreModules/Avatar/Profiles
parentAdd a profile module interface for the client view to use (diff)
downloadopensim-SC_OLD-0f3f2e1dc007f48dcccb27932923a8d586eedb5f.zip
opensim-SC_OLD-0f3f2e1dc007f48dcccb27932923a8d586eedb5f.tar.gz
opensim-SC_OLD-0f3f2e1dc007f48dcccb27932923a8d586eedb5f.tar.bz2
opensim-SC_OLD-0f3f2e1dc007f48dcccb27932923a8d586eedb5f.tar.xz
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
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/Profiles')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Profiles/AvatarProfilesModule.cs8
1 files changed, 8 insertions, 0 deletions
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
41 { 41 {
42 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 42 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
43 private Scene m_scene; 43 private Scene m_scene;
44 private IProfileModule m_profileModule = null;
44 45
45 public AvatarProfilesModule() 46 public AvatarProfilesModule()
46 { 47 {
@@ -56,6 +57,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Profiles
56 57
57 public void PostInitialise() 58 public void PostInitialise()
58 { 59 {
60 m_profileModule = scene.RequestModuleInterface<IProfileModule>();
59 } 61 }
60 62
61 public void Close() 63 public void Close()
@@ -108,6 +110,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Profiles
108 charterMember = Utils.StringToBytes(profile.CustomType); 110 charterMember = Utils.StringToBytes(profile.CustomType);
109 } 111 }
110 112
113 if (m_profileModule != null)
114 {
115 Hashtable profileData = m_profileModule.GetProfileData(remoteClient.AgentId);
116 if (profileData["ProfileUrl"] != null)
117 profile.ProfileUrl = profileData["ProfileUrl"].ToString();
118 }
111 remoteClient.SendAvatarProperties(profile.ID, profile.AboutText, 119 remoteClient.SendAvatarProperties(profile.ID, profile.AboutText,
112 Util.ToDateTime(profile.Created).ToString("M/d/yyyy", CultureInfo.InvariantCulture), 120 Util.ToDateTime(profile.Created).ToString("M/d/yyyy", CultureInfo.InvariantCulture),
113 charterMember, profile.FirstLifeAboutText, (uint)(profile.UserFlags & 0xff), 121 charterMember, profile.FirstLifeAboutText, (uint)(profile.UserFlags & 0xff),