mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
Updates all IRegionModules to the new style region modules.
Signed-off-by: Melanie <melanie@t-data.com>
This commit is contained in:
@@ -25,9 +25,11 @@
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using log4net;
|
||||
using Mono.Addins;
|
||||
using Nini.Config;
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Framework;
|
||||
@@ -36,7 +38,8 @@ using OpenSim.Region.Framework.Scenes;
|
||||
|
||||
namespace OpenSim.Region.CoreModules.Avatar.Groups
|
||||
{
|
||||
public class GroupsModule : IRegionModule
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class GroupsModule : ISharedRegionModule
|
||||
{
|
||||
private static readonly ILog m_log =
|
||||
LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
@@ -55,9 +58,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Groups
|
||||
private static GroupMembershipData osGroup =
|
||||
new GroupMembershipData();
|
||||
|
||||
#region IRegionModule Members
|
||||
#region ISharedRegionModule Members
|
||||
|
||||
public void Initialise(Scene scene, IConfigSource config)
|
||||
public void Initialise(IConfigSource config)
|
||||
{
|
||||
IConfig groupsConfig = config.Configs["Groups"];
|
||||
|
||||
@@ -76,7 +79,15 @@ namespace OpenSim.Region.CoreModules.Avatar.Groups
|
||||
if (groupsConfig.GetString("Module", "Default") != "Default")
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
{
|
||||
lock (m_SceneList)
|
||||
{
|
||||
if (!m_SceneList.Contains(scene))
|
||||
@@ -99,6 +110,19 @@ namespace OpenSim.Region.CoreModules.Avatar.Groups
|
||||
scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage;
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
if (m_SceneList.Contains(scene))
|
||||
m_SceneList.Remove(scene);
|
||||
scene.EventManager.OnNewClient -= OnNewClient;
|
||||
scene.EventManager.OnClientClosed -= OnClientClosed;
|
||||
scene.EventManager.OnIncomingInstantMessage -= OnGridInstantMessage;
|
||||
}
|
||||
|
||||
public void PostInitialise()
|
||||
{
|
||||
}
|
||||
@@ -123,11 +147,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Groups
|
||||
get { return "GroupsModule"; }
|
||||
}
|
||||
|
||||
public bool IsSharedModule
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private void OnNewClient(IClientAPI client)
|
||||
|
||||
Reference in New Issue
Block a user