Profile Updates

Update basic profile to use the replaceable interface, making configuration less error-prone. Add support to query avatar's home user account and profile service for regions usng the updated OpenProfileModule with Hypergrid.
This commit is contained in:
BlueWall
2012-01-01 14:57:13 -05:00
parent 56dbcae402
commit 6941058824
8 changed files with 253 additions and 5 deletions

View File

@@ -43,7 +43,7 @@ using OpenSim.Services.Interfaces;
namespace OpenSim.Region.CoreModules.Avatar.Profile
{
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
public class BasicProfileModule : ISharedRegionModule
public class BasicProfileModule : IProfileModule, ISharedRegionModule
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@@ -57,6 +57,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Profile
public void Initialise(IConfigSource config)
{
// This can be reduced later as the loader will determine
// whether we are needed
if (config.Configs["Profile"] != null)
{
if (config.Configs["Profile"].GetString("Module", string.Empty) != "BasicProfileModule")
@@ -65,14 +67,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Profile
m_log.DebugFormat("[PROFILE MODULE]: Basic Profile Module enabled");
m_Enabled = true;
}
public void AddRegion(Scene scene)
{
if (!m_Enabled)
return;
lock (m_Scenes)
{
if (!m_Scenes.Contains(scene))
@@ -80,6 +81,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Profile
m_Scenes.Add(scene);
// Hook up events
scene.EventManager.OnNewClient += OnNewClient;
scene.RegisterModuleInterface<IProfileModule>(this);
}
}
}
@@ -116,7 +118,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Profile
public Type ReplaceableInterface
{
get { return null; }
get { return typeof(IProfileModule); }
}
#endregion
@@ -170,4 +172,4 @@ namespace OpenSim.Region.CoreModules.Avatar.Profile
}
}
}
}