mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 22:26:09 +08:00
add Util.GetFirstConfigVarFromSections<T>(..) While GetConfigVarFromSections<T> scans all sections and returns the last value found, this returns as soon a value is found. So sections should be order from high priority to lower
This commit is contained in:
@@ -100,18 +100,7 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
IConfigSource config = m_Scene.Config;
|
||||
if (config is not null)
|
||||
{
|
||||
IConfig sconfig = config.Configs["Startup"];
|
||||
if (sconfig is not null)
|
||||
ConfigOptions.levelUpload = sconfig.GetInt("LevelUpload", -9798);
|
||||
|
||||
if (ConfigOptions.levelUpload == -9798)
|
||||
{
|
||||
IConfig pconfig = config.Configs["Permissions"];
|
||||
if (pconfig is not null)
|
||||
ConfigOptions.levelUpload = pconfig.GetInt("LevelUpload", 0);
|
||||
}
|
||||
if (ConfigOptions.levelUpload == -9798)
|
||||
ConfigOptions.levelUpload = 0;
|
||||
ConfigOptions.levelUpload = Util.GetFirstConfigVarFromSections<int>(config,"LevelUpload",["Permissions", "Startup"], 0);
|
||||
|
||||
IConfig appearanceConfig = config.Configs["Appearance"];
|
||||
if (appearanceConfig is not null)
|
||||
|
||||
Reference in New Issue
Block a user