mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 17:55:48 +08:00
Added new Util function for reading config vars that's more generic than the one I added yesterday -- this is for helping move config vars out of [Startup]
This commit is contained in:
@@ -65,7 +65,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Lure
|
||||
{
|
||||
m_Enabled = true;
|
||||
|
||||
m_ThisGridURL = Util.GetConfigVarWithDefaultSection(config, "GatekeeperURI", "Messaging");
|
||||
m_ThisGridURL = Util.GetConfigVarFromSections<string>(config, "GatekeeperURI", new string[] {"Startup", "Messaging"});
|
||||
// Legacy. Remove soon!
|
||||
m_ThisGridURL = config.Configs["Messaging"].GetString("Gatekeeper", m_ThisGridURL);
|
||||
m_log.DebugFormat("[LURE MODULE]: {0} enabled", Name);
|
||||
|
||||
@@ -88,11 +88,12 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||
IConfig thisModuleConfig = source.Configs["HGInventoryAccessModule"];
|
||||
if (thisModuleConfig != null)
|
||||
{
|
||||
m_HomeURI = Util.GetConfigVarWithDefaultSection(source, "HomeURI", "HGInventoryAccessModule");
|
||||
m_OutboundPermission = thisModuleConfig.GetBoolean("OutboundPermission", true);
|
||||
m_ThisGatekeeper = Util.GetConfigVarWithDefaultSection(source, "GatekeeperURI", "HGInventoryAccessModule");
|
||||
m_HomeURI = Util.GetConfigVarFromSections<string>(source, "HomeURI", new string[] {"Startup", "HGInventoryAccessModule"});
|
||||
m_ThisGatekeeper = Util.GetConfigVarFromSections<string>(source, "GatekeeperURI", new string[] {"Startup", "HGInventoryAccessModule"});
|
||||
// Legacy. Renove soon!
|
||||
m_ThisGatekeeper = thisModuleConfig.GetString("Gatekeeper", m_ThisGatekeeper);
|
||||
|
||||
m_OutboundPermission = thisModuleConfig.GetBoolean("OutboundPermission", true);
|
||||
m_RestrictInventoryAccessAbroad = thisModuleConfig.GetBoolean("RestrictInventoryAccessAbroad", true);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -113,7 +113,7 @@ namespace OpenSim.Region.DataSnapshot
|
||||
try
|
||||
{
|
||||
m_enabled = config.Configs["DataSnapshot"].GetBoolean("index_sims", m_enabled);
|
||||
string gatekeeper = Util.GetConfigVarWithDefaultSection(config, "GatekeeperURI", "GridService");
|
||||
string gatekeeper = Util.GetConfigVarFromSections<string>(config, "GatekeeperURI", new string[] {"Startup", "GridService"});
|
||||
// Legacy. Remove soon!
|
||||
if (string.IsNullOrEmpty(gatekeeper))
|
||||
{
|
||||
|
||||
@@ -2138,7 +2138,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
m_host.AddScriptLPS(1);
|
||||
|
||||
IConfigSource config = m_ScriptEngine.ConfigSource;
|
||||
string HomeURI = Util.GetConfigVarWithDefaultSection(config, "HomeURI", string.Empty);
|
||||
string HomeURI = Util.GetConfigVarFromSections<string>(config, "HomeURI", new string[]{"Startup"});
|
||||
|
||||
if (!string.IsNullOrEmpty(HomeURI))
|
||||
return HomeURI;
|
||||
@@ -2159,7 +2159,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
m_host.AddScriptLPS(1);
|
||||
|
||||
IConfigSource config = m_ScriptEngine.ConfigSource;
|
||||
string gatekeeperURI = Util.GetConfigVarWithDefaultSection(config, "GatekeeperURI", string.Empty);
|
||||
string gatekeeperURI = Util.GetConfigVarFromSections<string>(config, "GatekeeperURI", new string[] {"Startup"});
|
||||
|
||||
if (!string.IsNullOrEmpty(gatekeeperURI))
|
||||
return gatekeeperURI;
|
||||
|
||||
Reference in New Issue
Block a user