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:
@@ -32,6 +32,7 @@ using System.Net;
|
||||
using System.Reflection;
|
||||
using System.Threading;
|
||||
using log4net;
|
||||
using Mono.Addins;
|
||||
using Nini.Config;
|
||||
using OpenMetaverse;
|
||||
using OpenMetaverse.Packets;
|
||||
@@ -52,11 +53,13 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue
|
||||
public OSDMap body;
|
||||
}
|
||||
|
||||
public class EventQueueGetModule : IEventQueue, IRegionModule
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class EventQueueGetModule : IEventQueue, INonSharedRegionModule
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
protected Scene m_scene = null;
|
||||
private IConfigSource m_gConfig;
|
||||
private IConfig m_startupConfig;
|
||||
bool enabledYN = false;
|
||||
|
||||
private Dictionary<UUID, int> m_ids = new Dictionary<UUID, int>();
|
||||
@@ -65,23 +68,31 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue
|
||||
private Dictionary<UUID, UUID> m_QueueUUIDAvatarMapping = new Dictionary<UUID, UUID>();
|
||||
private Dictionary<UUID, UUID> m_AvatarQueueUUIDMapping = new Dictionary<UUID, UUID>();
|
||||
|
||||
#region IRegionModule methods
|
||||
public virtual void Initialise(Scene scene, IConfigSource config)
|
||||
#region INonSharedRegionModule methods
|
||||
public virtual void Initialise(IConfigSource config)
|
||||
{
|
||||
m_gConfig = config;
|
||||
|
||||
IConfig startupConfig = m_gConfig.Configs["Startup"];
|
||||
m_startupConfig = m_gConfig.Configs["Startup"];
|
||||
}
|
||||
|
||||
ReadConfigAndPopulate(scene, startupConfig, "Startup");
|
||||
public Type ReplaceableInterface
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
{
|
||||
ReadConfigAndPopulate(scene, m_startupConfig, "Startup");
|
||||
|
||||
if (enabledYN)
|
||||
{
|
||||
m_scene = scene;
|
||||
scene.RegisterModuleInterface<IEventQueue>(this);
|
||||
|
||||
|
||||
// Register fallback handler
|
||||
// Why does EQG Fail on region crossings!
|
||||
|
||||
|
||||
//scene.CommsManager.HttpServer.AddLLSDHandler("/CAPS/EQG/", EventQueueFallBack);
|
||||
|
||||
scene.EventManager.OnNewClient += OnNewClient;
|
||||
@@ -99,7 +110,14 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue
|
||||
{
|
||||
m_gConfig = null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
}
|
||||
|
||||
private void ReadConfigAndPopulate(Scene scene, IConfig startupConfig, string p)
|
||||
@@ -107,10 +125,6 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue
|
||||
enabledYN = startupConfig.GetBoolean("EventQueue", true);
|
||||
}
|
||||
|
||||
public void PostInitialise()
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void Close()
|
||||
{
|
||||
}
|
||||
@@ -120,10 +134,6 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue
|
||||
get { return "EventQueueGetModule"; }
|
||||
}
|
||||
|
||||
public bool IsSharedModule
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user