This is somewhat major-like..... Change the intialization order of

Application plugins so that MainServer.Instance gets assigned before
RegionModulesController loads the new style shared modules. This
is needed because otherwise no new style shared module could
register a HTTP method.... if it breaks, you get to keep both pieces
slimupdates
Melanie 2009-12-28 01:56:30 +00:00
parent eebddcd5e6
commit 3a953dfc98
3 changed files with 15 additions and 13 deletions

View File

@ -65,9 +65,13 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController
public void Initialise (OpenSimBase openSim) public void Initialise (OpenSimBase openSim)
{ {
m_log.DebugFormat("[REGIONMODULES]: Initializing...");
m_openSim = openSim; m_openSim = openSim;
openSim.ApplicationRegistry.RegisterInterface<IRegionModulesController>(this); }
public void PostInitialise ()
{
m_log.DebugFormat("[REGIONMODULES]: Initializing...");
m_openSim.ApplicationRegistry.RegisterInterface<IRegionModulesController>(this);
// Who we are // Who we are
string id = AddinManager.CurrentAddin.Id; string id = AddinManager.CurrentAddin.Id;
@ -81,9 +85,9 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController
// The [Modules] section in the ini file // The [Modules] section in the ini file
IConfig modulesConfig = IConfig modulesConfig =
openSim.ConfigSource.Source.Configs["Modules"]; m_openSim.ConfigSource.Source.Configs["Modules"];
if (modulesConfig == null) if (modulesConfig == null)
modulesConfig = openSim.ConfigSource.Source.AddConfig("Modules"); modulesConfig = m_openSim.ConfigSource.Source.AddConfig("Modules");
// Scan modules and load all that aren't disabled // Scan modules and load all that aren't disabled
foreach (TypeExtensionNode node in foreach (TypeExtensionNode node in
@ -195,7 +199,7 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController
// OK, we're up and running // OK, we're up and running
m_sharedInstances.Add(module); m_sharedInstances.Add(module);
module.Initialise(openSim.ConfigSource.Source); module.Initialise(m_openSim.ConfigSource.Source);
} }
// Immediately run PostInitialise on shared modules // Immediately run PostInitialise on shared modules
@ -205,10 +209,6 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController
} }
} }
public void PostInitialise ()
{
}
#endregion #endregion
#region IPlugin implementation #region IPlugin implementation

View File

@ -61,9 +61,6 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
return; return;
} }
MainServer.Instance.AddXmlRPCHandler(
"grid_instant_message", processXMLRPCGridInstantMessage);
m_Enabled = true; m_Enabled = true;
} }
@ -82,6 +79,11 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
public virtual void PostInitialise() public virtual void PostInitialise()
{ {
if (!m_Enabled)
return;
MainServer.Instance.AddXmlRPCHandler(
"grid_instant_message", processXMLRPCGridInstantMessage);
} }
public virtual void RegionLoaded(Scene scene) public virtual void RegionLoaded(Scene scene)

View File

@ -37,7 +37,7 @@ using OpenSim.Framework.Client;
using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Interfaces;
using OpenSim.Region.Framework.Scenes; using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.CoreModules.Avatar.MuteList namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
{ {
public class MuteListModule : ISharedRegionModule public class MuteListModule : ISharedRegionModule
{ {