mirror of
https://github.com/opensim/opensim.git
synced 2026-08-04 16:22:50 +08:00
Updates all IRegionModules to the new style region modules.
Signed-off-by: Melanie <melanie@t-data.com>
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Mono.Addins;
|
||||
using Nini.Config;
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Framework;
|
||||
@@ -85,7 +86,8 @@ using OpenSim.Region.Framework.Scenes;
|
||||
|
||||
namespace OpenSim.Region.CoreModules.Scripting.WorldComm
|
||||
{
|
||||
public class WorldCommModule : IRegionModule, IWorldComm
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class WorldCommModule : INonSharedRegionModule, IWorldComm
|
||||
{
|
||||
// private static readonly ILog m_log =
|
||||
// LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
@@ -98,9 +100,9 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm
|
||||
private int m_saydistance = 30;
|
||||
private int m_shoutdistance = 100;
|
||||
|
||||
#region IRegionModule Members
|
||||
#region ISharedRegionModule Members
|
||||
|
||||
public void Initialise(Scene scene, IConfigSource config)
|
||||
public void Initialise(IConfigSource config)
|
||||
{
|
||||
// wrap this in a try block so that defaults will work if
|
||||
// the config file doesn't specify otherwise.
|
||||
@@ -120,17 +122,33 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm
|
||||
if (maxlisteners < 1) maxlisteners = int.MaxValue;
|
||||
if (maxhandles < 1) maxhandles = int.MaxValue;
|
||||
|
||||
m_scene = scene;
|
||||
m_scene.RegisterModuleInterface<IWorldComm>(this);
|
||||
m_listenerManager = new ListenerManager(maxlisteners, maxhandles);
|
||||
m_scene.EventManager.OnChatFromClient += DeliverClientMessage;
|
||||
m_scene.EventManager.OnChatBroadcast += DeliverClientMessage;
|
||||
m_pendingQ = new Queue();
|
||||
m_pending = Queue.Synchronized(m_pendingQ);
|
||||
}
|
||||
|
||||
public void PostInitialise()
|
||||
public void AddRegion(Scene scene)
|
||||
{
|
||||
m_scene = scene;
|
||||
m_scene.RegisterModuleInterface<IWorldComm>(this);
|
||||
m_scene.EventManager.OnChatFromClient += DeliverClientMessage;
|
||||
m_scene.EventManager.OnChatBroadcast += DeliverClientMessage;
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
scene.UnregisterModuleInterface<IWorldComm>(this);
|
||||
scene.EventManager.OnChatFromClient -= DeliverClientMessage;
|
||||
scene.EventManager.OnChatBroadcast -= DeliverClientMessage;
|
||||
}
|
||||
|
||||
public void Close()
|
||||
@@ -142,11 +160,6 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm
|
||||
get { return "WorldCommModule"; }
|
||||
}
|
||||
|
||||
public bool IsSharedModule
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IWorldComm Members
|
||||
|
||||
Reference in New Issue
Block a user