mirror of
https://github.com/opensim/opensim.git
synced 2026-08-08 18:25:33 +08:00
Simplification of HG configs: HomeURI and GatekeeperURI now are defined as default under [Startup]. They can then be overwritten in the other sections (but probably shouldn't). I kept the existing code for backwards compatibility, so this should not cause any breaks from people's current configurations. But people should move to have these 2 vars under [Startup] -- see OpenSim.ini.example and Robust.HG.ini.example. And yes, both names now end with "URI" for consistency.
This commit is contained in:
@@ -65,7 +65,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Lure
|
||||
{
|
||||
m_Enabled = true;
|
||||
|
||||
m_ThisGridURL = config.Configs["Messaging"].GetString("Gatekeeper", string.Empty);
|
||||
m_ThisGridURL = Util.GetConfigVarWithDefaultSection(config, "GatekeeperURI", "Messaging");
|
||||
// Legacy. Remove soon!
|
||||
m_ThisGridURL = config.Configs["Messaging"].GetString("Gatekeeper", m_ThisGridURL);
|
||||
m_log.DebugFormat("[LURE MODULE]: {0} enabled", Name);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,12 +88,11 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||
IConfig thisModuleConfig = source.Configs["HGInventoryAccessModule"];
|
||||
if (thisModuleConfig != null)
|
||||
{
|
||||
// legacy configuration [obsolete]
|
||||
m_HomeURI = thisModuleConfig.GetString("ProfileServerURI", string.Empty);
|
||||
// preferred
|
||||
m_HomeURI = thisModuleConfig.GetString("HomeURI", m_HomeURI);
|
||||
m_HomeURI = Util.GetConfigVarWithDefaultSection(source, "HomeURI", "HGInventoryAccessModule");
|
||||
m_OutboundPermission = thisModuleConfig.GetBoolean("OutboundPermission", true);
|
||||
m_ThisGatekeeper = thisModuleConfig.GetString("Gatekeeper", string.Empty);
|
||||
m_ThisGatekeeper = Util.GetConfigVarWithDefaultSection(source, "GatekeeperURI", "HGInventoryAccessModule");
|
||||
// Legacy. Renove soon!
|
||||
m_ThisGatekeeper = thisModuleConfig.GetString("Gatekeeper", m_ThisGatekeeper);
|
||||
m_RestrictInventoryAccessAbroad = thisModuleConfig.GetBoolean("RestrictInventoryAccessAbroad", true);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -113,9 +113,16 @@ namespace OpenSim.Region.DataSnapshot
|
||||
try
|
||||
{
|
||||
m_enabled = config.Configs["DataSnapshot"].GetBoolean("index_sims", m_enabled);
|
||||
IConfig conf = config.Configs["GridService"];
|
||||
if (conf != null)
|
||||
m_gridinfo.Add("gatekeeperURL", conf.GetString("Gatekeeper", String.Empty));
|
||||
string gatekeeper = Util.GetConfigVarWithDefaultSection(config, "GatekeeperURI", "GridService");
|
||||
// Legacy. Remove soon!
|
||||
if (string.IsNullOrEmpty(gatekeeper))
|
||||
{
|
||||
IConfig conf = config.Configs["GridService"];
|
||||
if (conf != null)
|
||||
gatekeeper = conf.GetString("Gatekeeper", gatekeeper);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(gatekeeper))
|
||||
m_gridinfo.Add("gatekeeperURL", gatekeeper);
|
||||
|
||||
m_gridinfo.Add(
|
||||
"name", config.Configs["DataSnapshot"].GetString("gridname", "the lost continent of hippo"));
|
||||
|
||||
@@ -2137,9 +2137,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
CheckThreatLevel(ThreatLevel.Moderate, "osGetGridHomeURI");
|
||||
m_host.AddScriptLPS(1);
|
||||
|
||||
string HomeURI = String.Empty;
|
||||
IConfigSource config = m_ScriptEngine.ConfigSource;
|
||||
string HomeURI = Util.GetConfigVarWithDefaultSection(config, "HomeURI", string.Empty);
|
||||
|
||||
if (!string.IsNullOrEmpty(HomeURI))
|
||||
return HomeURI;
|
||||
|
||||
// Legacy. Remove soon!
|
||||
if (config.Configs["LoginService"] != null)
|
||||
HomeURI = config.Configs["LoginService"].GetString("SRV_HomeURI", HomeURI);
|
||||
|
||||
@@ -2154,9 +2158,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
CheckThreatLevel(ThreatLevel.Moderate, "osGetGridGatekeeperURI");
|
||||
m_host.AddScriptLPS(1);
|
||||
|
||||
string gatekeeperURI = String.Empty;
|
||||
IConfigSource config = m_ScriptEngine.ConfigSource;
|
||||
string gatekeeperURI = Util.GetConfigVarWithDefaultSection(config, "GatekeeperURI", string.Empty);
|
||||
|
||||
if (!string.IsNullOrEmpty(gatekeeperURI))
|
||||
return gatekeeperURI;
|
||||
|
||||
// Legacy. Remove soon!
|
||||
if (config.Configs["GridService"] != null)
|
||||
gatekeeperURI = config.Configs["GridService"].GetString("Gatekeeper", gatekeeperURI);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user