This fixes the problem that region modules (new style) weren't being recognized.
parent
19ad68e5e4
commit
4e7c449c5a
|
@ -66,12 +66,8 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController
|
||||||
public void Initialise (OpenSimBase openSim)
|
public void Initialise (OpenSimBase openSim)
|
||||||
{
|
{
|
||||||
m_openSim = openSim;
|
m_openSim = openSim;
|
||||||
}
|
|
||||||
|
|
||||||
public void PostInitialise ()
|
|
||||||
{
|
|
||||||
m_log.DebugFormat("[REGIONMODULES]: Initializing...");
|
|
||||||
m_openSim.ApplicationRegistry.RegisterInterface<IRegionModulesController>(this);
|
m_openSim.ApplicationRegistry.RegisterInterface<IRegionModulesController>(this);
|
||||||
|
m_log.DebugFormat("[REGIONMODULES]: Initializing...");
|
||||||
|
|
||||||
// Who we are
|
// Who we are
|
||||||
string id = AddinManager.CurrentAddin.Id;
|
string id = AddinManager.CurrentAddin.Id;
|
||||||
|
@ -108,7 +104,7 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Split off port, if present
|
// Split off port, if present
|
||||||
string[] moduleParts = moduleString.Split(new char[] {'/'}, 2);
|
string[] moduleParts = moduleString.Split(new char[] { '/' }, 2);
|
||||||
// Format is [port/][class]
|
// Format is [port/][class]
|
||||||
string className = moduleParts[0];
|
string className = moduleParts[0];
|
||||||
if (moduleParts.Length > 1)
|
if (moduleParts.Length > 1)
|
||||||
|
@ -138,7 +134,7 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Split off port, if present
|
// Split off port, if present
|
||||||
string[] moduleParts = moduleString.Split(new char[] {'/'}, 2);
|
string[] moduleParts = moduleString.Split(new char[] { '/' }, 2);
|
||||||
// Format is [port/][class]
|
// Format is [port/][class]
|
||||||
string className = moduleParts[0];
|
string className = moduleParts[0];
|
||||||
if (moduleParts.Length > 1)
|
if (moduleParts.Length > 1)
|
||||||
|
@ -166,7 +162,7 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController
|
||||||
//
|
//
|
||||||
foreach (TypeExtensionNode node in m_sharedModules)
|
foreach (TypeExtensionNode node in m_sharedModules)
|
||||||
{
|
{
|
||||||
Object[] ctorArgs = new Object[] {(uint)0};
|
Object[] ctorArgs = new Object[] { (uint)0 };
|
||||||
|
|
||||||
// Read the config again
|
// Read the config again
|
||||||
string moduleString =
|
string moduleString =
|
||||||
|
@ -176,7 +172,7 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController
|
||||||
if (moduleString != String.Empty)
|
if (moduleString != String.Empty)
|
||||||
{
|
{
|
||||||
// Get the port number from the string
|
// Get the port number from the string
|
||||||
string[] moduleParts = moduleString.Split(new char[] {'/'},
|
string[] moduleParts = moduleString.Split(new char[] { '/' },
|
||||||
2);
|
2);
|
||||||
if (moduleParts.Length > 1)
|
if (moduleParts.Length > 1)
|
||||||
ctorArgs[0] = Convert.ToUInt32(moduleParts[0]);
|
ctorArgs[0] = Convert.ToUInt32(moduleParts[0]);
|
||||||
|
@ -202,11 +198,19 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController
|
||||||
module.Initialise(m_openSim.ConfigSource.Source);
|
module.Initialise(m_openSim.ConfigSource.Source);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void PostInitialise ()
|
||||||
|
{
|
||||||
|
m_log.DebugFormat("[REGIONMODULES]: PostInitializing...");
|
||||||
|
|
||||||
// Immediately run PostInitialise on shared modules
|
// Immediately run PostInitialise on shared modules
|
||||||
foreach (ISharedRegionModule module in m_sharedInstances)
|
foreach (ISharedRegionModule module in m_sharedInstances)
|
||||||
{
|
{
|
||||||
module.PostInitialise();
|
module.PostInitialise();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
@ -197,6 +197,7 @@ namespace OpenSim
|
||||||
LoadPlugins();
|
LoadPlugins();
|
||||||
foreach (IApplicationPlugin plugin in m_plugins)
|
foreach (IApplicationPlugin plugin in m_plugins)
|
||||||
{
|
{
|
||||||
|
m_log.Debug("XXX PostInitialise " + plugin.Name);
|
||||||
plugin.PostInitialise();
|
plugin.PostInitialise();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue