mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 01:06:30 +08:00
Updates all IRegionModules to the new style region modules.
Signed-off-by: Melanie <melanie@t-data.com>
This commit is contained in:
@@ -30,6 +30,7 @@ using System.Collections;
|
||||
using System.Globalization;
|
||||
using System.Reflection;
|
||||
using log4net;
|
||||
using Mono.Addins;
|
||||
using Nini.Config;
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Framework;
|
||||
@@ -38,20 +39,17 @@ using OpenSim.Region.Framework.Scenes;
|
||||
|
||||
namespace OpenSim.Region.CoreModules.Avatar.Profiles
|
||||
{
|
||||
public class AvatarProfilesModule : IRegionModule
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class AvatarProfilesModule : INonSharedRegionModule
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
private Scene m_scene;
|
||||
private IProfileModule m_profileModule = null;
|
||||
private bool m_enabled = true;
|
||||
|
||||
public AvatarProfilesModule()
|
||||
{
|
||||
}
|
||||
#region INonSharedRegionModule Members
|
||||
|
||||
#region IRegionModule Members
|
||||
|
||||
public void Initialise(Scene scene, IConfigSource config)
|
||||
public void Initialise(IConfigSource config)
|
||||
{
|
||||
IConfig profileConfig = config.Configs["Profile"];
|
||||
if (profileConfig != null)
|
||||
@@ -62,18 +60,31 @@ namespace OpenSim.Region.CoreModules.Avatar.Profiles
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
{
|
||||
m_scene = scene;
|
||||
m_scene.EventManager.OnNewClient += NewClient;
|
||||
}
|
||||
|
||||
public void PostInitialise()
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
if (!m_enabled)
|
||||
return;
|
||||
m_profileModule = m_scene.RequestModuleInterface<IProfileModule>();
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
scene.EventManager.OnNewClient -= NewClient;
|
||||
}
|
||||
|
||||
public void Close()
|
||||
{
|
||||
}
|
||||
@@ -83,11 +94,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Profiles
|
||||
get { return "AvatarProfilesModule"; }
|
||||
}
|
||||
|
||||
public bool IsSharedModule
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public void NewClient(IClientAPI client)
|
||||
|
||||
Reference in New Issue
Block a user