Move AllowedClients and BannedClients section to new [AccessControl] section in OpenSim.ini from [Startup]

This change also corrects the setting names - they were actually wrong (though the text in {} was correct).
If there are settings in [Startup] they will continue to be used and anything there will override settings in [AccessControl]
This commit is contained in:
Justin Clark-Casey (justincc)
2013-03-02 01:43:54 +00:00
parent 4999d7920a
commit 1bc8692a99
2 changed files with 16 additions and 4 deletions

View File

@@ -932,7 +932,12 @@ namespace OpenSim.Region.Framework.Scenes
}
}
string grant = startupConfig.GetString("AllowedClients", String.Empty);
string[] possibleAccessControlConfigSections = new string[] { "AccessControl", "Startup" };
string grant
= Util.GetConfigVarFromSections<string>(
config, "AllowedClients", possibleAccessControlConfigSections, "");
if (grant.Length > 0)
{
foreach (string viewer in grant.Split('|'))
@@ -941,7 +946,10 @@ namespace OpenSim.Region.Framework.Scenes
}
}
grant = startupConfig.GetString("BannedClients", String.Empty);
grant
= Util.GetConfigVarFromSections<string>(
config, "BannedClients", possibleAccessControlConfigSections, "");
if (grant.Length > 0)
{
foreach (string viewer in grant.Split('|'))