* Stop the instant message module from trying to register for the message transfer module in PostInitialise() if it hasn't actually been enabled
parent
e0cef010f3
commit
6f9c1e3bcc
|
@ -46,12 +46,15 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
|
/// <value>
|
||||||
|
/// Is this module enabled?
|
||||||
|
/// </value>
|
||||||
|
private bool m_enabled = false;
|
||||||
|
|
||||||
private readonly List<Scene> m_scenes = new List<Scene>();
|
private readonly List<Scene> m_scenes = new List<Scene>();
|
||||||
|
|
||||||
#region IRegionModule Members
|
#region IRegionModule Members
|
||||||
|
|
||||||
//private bool gridmode = false;
|
|
||||||
|
|
||||||
private IMessageTransferModule m_TransferModule = null;
|
private IMessageTransferModule m_TransferModule = null;
|
||||||
|
|
||||||
public void Initialise(Scene scene, IConfigSource config)
|
public void Initialise(Scene scene, IConfigSource config)
|
||||||
|
@ -64,6 +67,8 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_enabled = true;
|
||||||
|
|
||||||
lock (m_scenes)
|
lock (m_scenes)
|
||||||
{
|
{
|
||||||
if (!m_scenes.Contains(scene))
|
if (!m_scenes.Contains(scene))
|
||||||
|
@ -86,6 +91,9 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
|
||||||
|
|
||||||
public void PostInitialise()
|
public void PostInitialise()
|
||||||
{
|
{
|
||||||
|
if (!m_enabled)
|
||||||
|
return;
|
||||||
|
|
||||||
m_TransferModule =
|
m_TransferModule =
|
||||||
m_scenes[0].RequestModuleInterface<IMessageTransferModule>();
|
m_scenes[0].RequestModuleInterface<IMessageTransferModule>();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue