aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/RegionLoader/Filesystem
diff options
context:
space:
mode:
authorKevin Houlihan & Michelle Argus2011-09-21 22:46:14 +0100
committerJustin Clark-Casey (justincc)2011-09-24 01:59:02 +0100
commit39d7945efc8daa6e5cd0f4728b499e7a624526cd (patch)
treeefa8a8e1c77aecb540f35209fee39b6c4f778298 /OpenSim/Framework/RegionLoader/Filesystem
parentDon't try and resolve user account for authorization if the agent has come in... (diff)
downloadopensim-SC_OLD-39d7945efc8daa6e5cd0f4728b499e7a624526cd.zip
opensim-SC_OLD-39d7945efc8daa6e5cd0f4728b499e7a624526cd.tar.gz
opensim-SC_OLD-39d7945efc8daa6e5cd0f4728b499e7a624526cd.tar.bz2
opensim-SC_OLD-39d7945efc8daa6e5cd0f4728b499e7a624526cd.tar.xz
Added a setting to [Startup] section of config that will allow the simulator to start up with no regions configured.
I added the boolean config setting "allow_regionless", defaulting to false. If set to true, opensim will start up ok if no region configurations are found in the specified region_info_source. It will not ask the user to create a region.
Diffstat (limited to 'OpenSim/Framework/RegionLoader/Filesystem')
-rw-r--r--OpenSim/Framework/RegionLoader/Filesystem/RegionLoaderFileSystem.cs4
1 files changed, 3 insertions, 1 deletions
diff --git a/OpenSim/Framework/RegionLoader/Filesystem/RegionLoaderFileSystem.cs b/OpenSim/Framework/RegionLoader/Filesystem/RegionLoaderFileSystem.cs
index 0aae4ff..8332c14 100644
--- a/OpenSim/Framework/RegionLoader/Filesystem/RegionLoaderFileSystem.cs
+++ b/OpenSim/Framework/RegionLoader/Filesystem/RegionLoaderFileSystem.cs
@@ -48,11 +48,13 @@ namespace OpenSim.Framework.RegionLoader.Filesystem
48 public RegionInfo[] LoadRegions() 48 public RegionInfo[] LoadRegions()
49 { 49 {
50 string regionConfigPath = Path.Combine(Util.configDir(), "Regions"); 50 string regionConfigPath = Path.Combine(Util.configDir(), "Regions");
51 bool allowRegionless = false;
51 52
52 try 53 try
53 { 54 {
54 IConfig startupConfig = (IConfig)m_configSource.Configs["Startup"]; 55 IConfig startupConfig = (IConfig)m_configSource.Configs["Startup"];
55 regionConfigPath = startupConfig.GetString("regionload_regionsdir", regionConfigPath).Trim(); 56 regionConfigPath = startupConfig.GetString("regionload_regionsdir", regionConfigPath).Trim();
57 allowRegionless = startupConfig.GetBoolean("allow_regionless", false);
56 } 58 }
57 catch (Exception) 59 catch (Exception)
58 { 60 {
@@ -68,7 +70,7 @@ namespace OpenSim.Framework.RegionLoader.Filesystem
68 string[] iniFiles = Directory.GetFiles(regionConfigPath, "*.ini"); 70 string[] iniFiles = Directory.GetFiles(regionConfigPath, "*.ini");
69 71
70 // Create an empty Regions.ini if there are no existing config files. 72 // Create an empty Regions.ini if there are no existing config files.
71 if (configFiles.Length == 0 && iniFiles.Length == 0) 73 if (!allowRegionless && configFiles.Length == 0 && iniFiles.Length == 0)
72 { 74 {
73 new RegionInfo("DEFAULT REGION CONFIG", Path.Combine(regionConfigPath, "Regions.ini"), false, m_configSource); 75 new RegionInfo("DEFAULT REGION CONFIG", Path.Combine(regionConfigPath, "Regions.ini"), false, m_configSource);
74 iniFiles = Directory.GetFiles(regionConfigPath, "*.ini"); 76 iniFiles = Directory.GetFiles(regionConfigPath, "*.ini");