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 modulearthursv
parent
94dfe2a20d
commit
0f3f2e1dc0
|
@ -41,6 +41,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Profiles
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
private Scene m_scene;
|
private Scene m_scene;
|
||||||
|
private IProfileModule m_profileModule = null;
|
||||||
|
|
||||||
public AvatarProfilesModule()
|
public AvatarProfilesModule()
|
||||||
{
|
{
|
||||||
|
@ -56,6 +57,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Profiles
|
||||||
|
|
||||||
public void PostInitialise()
|
public void PostInitialise()
|
||||||
{
|
{
|
||||||
|
m_profileModule = scene.RequestModuleInterface<IProfileModule>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Close()
|
public void Close()
|
||||||
|
@ -108,6 +110,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Profiles
|
||||||
charterMember = Utils.StringToBytes(profile.CustomType);
|
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,
|
remoteClient.SendAvatarProperties(profile.ID, profile.AboutText,
|
||||||
Util.ToDateTime(profile.Created).ToString("M/d/yyyy", CultureInfo.InvariantCulture),
|
Util.ToDateTime(profile.Created).ToString("M/d/yyyy", CultureInfo.InvariantCulture),
|
||||||
charterMember, profile.FirstLifeAboutText, (uint)(profile.UserFlags & 0xff),
|
charterMember, profile.FirstLifeAboutText, (uint)(profile.UserFlags & 0xff),
|
||||||
|
|
Loading…
Reference in New Issue