Merge branch 'regionready' into opensim
commit
3581b9abce
|
@ -8,6 +8,7 @@
|
||||||
</Dependencies>
|
</Dependencies>
|
||||||
|
|
||||||
<Extension path = "/OpenSim/RegionModules">
|
<Extension path = "/OpenSim/RegionModules">
|
||||||
|
<RegionModule id="RegionReady" type="OpenSim.Region.OptionalModules.Scripting.RegionReady.RegionReadyModule" />
|
||||||
<RegionModule id="IRCBridge" type="OpenSim.Region.OptionalModules.Avatar.Chat.IRCBridgeModule" />
|
<RegionModule id="IRCBridge" type="OpenSim.Region.OptionalModules.Avatar.Chat.IRCBridgeModule" />
|
||||||
<RegionModule id="Concierge" type="OpenSim.Region.OptionalModules.Avatar.Concierge.ConciergeModule" />
|
<RegionModule id="Concierge" type="OpenSim.Region.OptionalModules.Avatar.Concierge.ConciergeModule" />
|
||||||
<RegionModule id="VivoxVoice" type="OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice.VivoxVoiceModule" />
|
<RegionModule id="VivoxVoice" type="OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice.VivoxVoiceModule" />
|
||||||
|
|
|
@ -37,11 +37,13 @@ using OpenSim.Framework;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
|
|
||||||
namespace OpenSim.Region.CoreModules.Scripting.RegionReady
|
namespace OpenSim.Region.OptionalModules.Scripting.RegionReady
|
||||||
{
|
{
|
||||||
public class RegionReady : IRegionModule
|
public class RegionReadyModule : INonSharedRegionModule
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly ILog m_log =
|
||||||
|
LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
private IConfig m_config = null;
|
private IConfig m_config = null;
|
||||||
private bool m_firstEmptyCompileQueue;
|
private bool m_firstEmptyCompileQueue;
|
||||||
private bool m_oarFileLoading;
|
private bool m_oarFileLoading;
|
||||||
|
@ -51,15 +53,17 @@ namespace OpenSim.Region.CoreModules.Scripting.RegionReady
|
||||||
|
|
||||||
Scene m_scene = null;
|
Scene m_scene = null;
|
||||||
|
|
||||||
#region IRegionModule interface
|
#region INonSharedRegionModule interface
|
||||||
|
|
||||||
public void Initialise(Scene scene, IConfigSource config)
|
public Type ReplaceableInterface
|
||||||
|
{
|
||||||
|
get { return null; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Initialise(IConfigSource config)
|
||||||
{
|
{
|
||||||
m_log.Info("[RegionReady] Initialising");
|
m_log.Info("[RegionReady] Initialising");
|
||||||
m_scene = scene;
|
|
||||||
m_firstEmptyCompileQueue = true;
|
|
||||||
m_oarFileLoading = false;
|
|
||||||
m_lastOarLoadedOk = true;
|
|
||||||
m_config = config.Configs["RegionReady"];
|
m_config = config.Configs["RegionReady"];
|
||||||
|
|
||||||
if (m_config != null)
|
if (m_config != null)
|
||||||
|
@ -70,36 +74,52 @@ namespace OpenSim.Region.CoreModules.Scripting.RegionReady
|
||||||
m_channelNotify = m_config.GetInt("channel_notify", m_channelNotify);
|
m_channelNotify = m_config.GetInt("channel_notify", m_channelNotify);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!m_enabled)
|
||||||
|
m_log.Info("[RegionReady] disabled.");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void PostInitialise()
|
public void AddRegion(Scene scene)
|
||||||
{
|
{
|
||||||
if (m_enabled)
|
if (!m_enabled)
|
||||||
{
|
return;
|
||||||
m_log.Info("[RegionReady]: Enabled");
|
|
||||||
m_scene.EventManager.OnEmptyScriptCompileQueue += new EventManager.EmptyScriptCompileQueue(OnEmptyScriptCompileQueue);
|
m_firstEmptyCompileQueue = true;
|
||||||
m_scene.EventManager.OnOarFileLoaded += new EventManager.OarFileLoaded(OnOarFileLoaded);
|
m_oarFileLoading = false;
|
||||||
}
|
m_lastOarLoadedOk = true;
|
||||||
else
|
|
||||||
{
|
m_scene = scene;
|
||||||
m_log.Info("[RegionReady]: Disabled");
|
|
||||||
}
|
m_scene.EventManager.OnEmptyScriptCompileQueue += OnEmptyScriptCompileQueue;
|
||||||
|
m_scene.EventManager.OnOarFileLoaded += OnOarFileLoaded;
|
||||||
|
|
||||||
|
m_log.InfoFormat("[RegionReady]: Enabled for region {0}", scene.RegionInfo.RegionName);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RemoveRegion(Scene scene)
|
||||||
|
{
|
||||||
|
if (!m_enabled)
|
||||||
|
return;
|
||||||
|
|
||||||
|
m_scene.EventManager.OnEmptyScriptCompileQueue -= OnEmptyScriptCompileQueue;
|
||||||
|
m_scene.EventManager.OnOarFileLoaded -= OnOarFileLoaded;
|
||||||
|
|
||||||
|
m_scene = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Close()
|
public void Close()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void RegionLoaded(Scene scene)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public string Name
|
public string Name
|
||||||
{
|
{
|
||||||
get { return "RegionReadyModule"; }
|
get { return "RegionReadyModule"; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsSharedModule
|
|
||||||
{
|
|
||||||
get { return false; }
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue