* Stop the instant message module from trying to register for the message transfer module in PostInitialise() if it hasn't actually been enabled

0.6.3-post-fixes
Justin Clarke Casey 2009-02-02 17:22:20 +00:00
parent e0cef010f3
commit 6f9c1e3bcc
1 changed files with 11 additions and 3 deletions

View File

@ -44,14 +44,17 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
{
public class InstantMessageModule : IRegionModule
{
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>();
#region IRegionModule Members
//private bool gridmode = false;
private IMessageTransferModule m_TransferModule = null;
public void Initialise(Scene scene, IConfigSource config)
@ -63,6 +66,8 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
"InstantMessageModule")
return;
}
m_enabled = true;
lock (m_scenes)
{
@ -86,6 +91,9 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
public void PostInitialise()
{
if (!m_enabled)
return;
m_TransferModule =
m_scenes[0].RequestModuleInterface<IMessageTransferModule>();