Add sending of the avatar interests and configuration of the profiles
module as an OpenSim profile module to Simian grid services. Patch by Dimentox, thank you. Applied with changes.0.7-release
parent
4e537a5a86
commit
adba22c29b
|
@ -88,7 +88,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
|
|
||||||
public void Initialise(IConfigSource source)
|
public void Initialise(IConfigSource source)
|
||||||
{
|
{
|
||||||
if (Simian.IsSimianEnabled(source, "UserAccountServices", this.Name))
|
if (Simian.IsSimianEnabled(source, "UserAccountServices", "SimianUserAccountServiceConnector"))
|
||||||
{
|
{
|
||||||
IConfig gridConfig = source.Configs["UserAccountService"];
|
IConfig gridConfig = source.Configs["UserAccountService"];
|
||||||
if (gridConfig == null)
|
if (gridConfig == null)
|
||||||
|
@ -108,6 +108,23 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
serviceUrl = serviceUrl + '/';
|
serviceUrl = serviceUrl + '/';
|
||||||
|
|
||||||
m_serverUrl = serviceUrl;
|
m_serverUrl = serviceUrl;
|
||||||
|
IConfig profilesConfig = source.Configs["Profiles"];
|
||||||
|
if (profilesConfig == null)
|
||||||
|
{
|
||||||
|
// Do not run this module by default.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// if profiles aren't enabled, we're not needed.
|
||||||
|
// if we're not specified as the connector to use, then we're not wanted
|
||||||
|
if (profilesConfig.GetString("Module", String.Empty) != Name)
|
||||||
|
{
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
m_log.InfoFormat("[SIMIAN ACCOUNT CONNECTOR]: Initializing {0}", this.Name);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -135,6 +152,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
|
|
||||||
// Profiles
|
// Profiles
|
||||||
client.OnRequestAvatarProperties += RequestAvatarPropertiesHandler;
|
client.OnRequestAvatarProperties += RequestAvatarPropertiesHandler;
|
||||||
|
|
||||||
client.OnUpdateAvatarProperties += UpdateAvatarPropertiesHandler;
|
client.OnUpdateAvatarProperties += UpdateAvatarPropertiesHandler;
|
||||||
client.OnAvatarInterestUpdate += AvatarInterestUpdateHandler;
|
client.OnAvatarInterestUpdate += AvatarInterestUpdateHandler;
|
||||||
client.OnUserInfoRequest += UserInfoRequestHandler;
|
client.OnUserInfoRequest += UserInfoRequestHandler;
|
||||||
|
@ -302,6 +320,19 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
System.Globalization.CultureInfo.InvariantCulture), charterMember, about["FLAbout"].AsString(), (uint)flags,
|
System.Globalization.CultureInfo.InvariantCulture), charterMember, about["FLAbout"].AsString(), (uint)flags,
|
||||||
about["FLImage"].AsUUID(), about["Image"].AsUUID(), about["URL"].AsString(), user["Partner"].AsUUID());
|
about["FLImage"].AsUUID(), about["Image"].AsUUID(), about["URL"].AsString(), user["Partner"].AsUUID());
|
||||||
|
|
||||||
|
OSDMap interests = null;
|
||||||
|
if (user.ContainsKey("LLInterests"))
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
interests = OSDParser.DeserializeJson(user["LLInterests"].AsString()) as OSDMap;
|
||||||
|
client.SendAvatarInterestsReply(avatarID, interests["WantMask"].AsUInteger(), interests["WantText"].AsString(), interests["SkillsMask"].AsUInteger(), interests["SkillsText"].AsString(), interests["languages"].AsString());
|
||||||
|
}
|
||||||
|
catch { }
|
||||||
|
}
|
||||||
|
|
||||||
|
if (about == null)
|
||||||
|
about = new OSDMap(0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue