mirror of
https://github.com/opensim/opensim.git
synced 2026-08-08 18:25:33 +08:00
As per the suggestion on the mailing list, added support for a OpenSim.xml config file, instead of a ini file. INI files still work the same as they did before, just now if a ini file isn't found, it looks for a OpenSim.xml file (of course in xml format) and if found uses that.
Includes a OpenSim.Example.xml for reference (the default settings saved as a xml file).
This commit is contained in:
@@ -51,7 +51,7 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
|
||||
m_log.Info("[LOADREGIONS]: Load Regions addin being initialised");
|
||||
|
||||
IRegionLoader regionLoader;
|
||||
if (openSim.ConfigSource.Configs["Startup"].GetString("region_info_source", "filesystem") == "filesystem")
|
||||
if (openSim.ConfigSource.ConfigSource.Configs["Startup"].GetString("region_info_source", "filesystem") == "filesystem")
|
||||
{
|
||||
m_log.Info("[LOADREGIONS]: Loading Region Info from filesystem");
|
||||
regionLoader = new RegionLoaderFileSystem();
|
||||
@@ -62,7 +62,7 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
|
||||
regionLoader = new RegionLoaderWebServer();
|
||||
}
|
||||
|
||||
regionLoader.SetIniConfigSource(openSim.ConfigSource);
|
||||
regionLoader.SetIniConfigSource(openSim.ConfigSource.ConfigSource);
|
||||
RegionInfo[] regionsToLoad = regionLoader.LoadRegions();
|
||||
|
||||
openSim.ModuleLoader.LoadDefaultSharedModules();
|
||||
@@ -89,7 +89,7 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
|
||||
m_log.Info("[LOADREGIONS]: Load Regions addin being initialised");
|
||||
|
||||
IRegionLoader regionLoader;
|
||||
if (openSim.ConfigSource.Configs["Startup"].GetString("region_info_source", "filesystem") == "filesystem")
|
||||
if (openSim.ConfigSource.ConfigSource.Configs["Startup"].GetString("region_info_source", "filesystem") == "filesystem")
|
||||
{
|
||||
m_log.Info("[LOADREGIONS]: Loading Region Info from filesystem");
|
||||
regionLoader = new RegionLoaderFileSystem();
|
||||
@@ -100,7 +100,7 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
|
||||
regionLoader = new RegionLoaderWebServer();
|
||||
}
|
||||
|
||||
regionLoader.SetIniConfigSource(openSim.ConfigSource);
|
||||
regionLoader.SetIniConfigSource(openSim.ConfigSource.ConfigSource);
|
||||
RegionInfo[] regionsToLoad = regionLoader.LoadRegions();
|
||||
for (int i = 0; i < regionsToLoad.Length; i++)
|
||||
{
|
||||
|
||||
@@ -58,11 +58,11 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
{
|
||||
try
|
||||
{
|
||||
if (openSim.ConfigSource.Configs["RemoteAdmin"] != null &&
|
||||
openSim.ConfigSource.Configs["RemoteAdmin"].GetBoolean("enabled", false))
|
||||
if (openSim.ConfigSource.ConfigSource.Configs["RemoteAdmin"] != null &&
|
||||
openSim.ConfigSource.ConfigSource.Configs["RemoteAdmin"].GetBoolean("enabled", false))
|
||||
{
|
||||
m_log.Info("[RADMIN]: Remote Admin Plugin Enabled");
|
||||
requiredPassword = openSim.ConfigSource.Configs["RemoteAdmin"].GetString("access_password", String.Empty);
|
||||
requiredPassword = openSim.ConfigSource.ConfigSource.Configs["RemoteAdmin"].GetString("access_password", String.Empty);
|
||||
|
||||
m_app = openSim;
|
||||
m_httpd = openSim.HttpServer;
|
||||
|
||||
@@ -203,7 +203,7 @@ namespace OpenSim.ApplicationPlugins.Rest
|
||||
|
||||
try
|
||||
{
|
||||
if ((_config = openSim.ConfigSource.Configs["RestPlugins"]) == null)
|
||||
if ((_config = openSim.ConfigSource.ConfigSource.Configs["RestPlugins"]) == null)
|
||||
{
|
||||
m_log.WarnFormat("{0} Rest Plugins not configured", MsgID);
|
||||
return;
|
||||
@@ -225,7 +225,7 @@ namespace OpenSim.ApplicationPlugins.Rest
|
||||
_prefix = _config.GetString("prefix", "/admin");
|
||||
|
||||
// Get plugin specific config
|
||||
_pluginConfig = openSim.ConfigSource.Configs[ConfigName];
|
||||
_pluginConfig = openSim.ConfigSource.ConfigSource.Configs[ConfigName];
|
||||
|
||||
|
||||
m_log.InfoFormat("{0} Rest Plugins Enabled", MsgID);
|
||||
|
||||
Reference in New Issue
Block a user