aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/ApplicationPlugins/LoadRegions
diff options
context:
space:
mode:
authoronefang2019-05-28 06:19:38 +1000
committeronefang2019-05-28 06:19:38 +1000
commitf921cb712e67893b44496192e5297335ed65caf7 (patch)
treeb3b2782530414e23400f10ecc5b718682d2745b1 /OpenSim/ApplicationPlugins/LoadRegions
parentManagement scripts encounters the real world, needs patching up. (diff)
downloadopensim-SC_OLD-f921cb712e67893b44496192e5297335ed65caf7.zip
opensim-SC_OLD-f921cb712e67893b44496192e5297335ed65caf7.tar.gz
opensim-SC_OLD-f921cb712e67893b44496192e5297335ed65caf7.tar.bz2
opensim-SC_OLD-f921cb712e67893b44496192e5297335ed65caf7.tar.xz
Add [Region] .ini block.
For including actual region definition in the normal .ini stack. Same as the usual Region.ini format, except we add a RegionName parameter.
Diffstat (limited to 'OpenSim/ApplicationPlugins/LoadRegions')
-rw-r--r--OpenSim/ApplicationPlugins/LoadRegions/RegionLoaderFileSystem.cs20
1 files changed, 15 insertions, 5 deletions
diff --git a/OpenSim/ApplicationPlugins/LoadRegions/RegionLoaderFileSystem.cs b/OpenSim/ApplicationPlugins/LoadRegions/RegionLoaderFileSystem.cs
index 0187418..4160483 100644
--- a/OpenSim/ApplicationPlugins/LoadRegions/RegionLoaderFileSystem.cs
+++ b/OpenSim/ApplicationPlugins/LoadRegions/RegionLoaderFileSystem.cs
@@ -68,9 +68,8 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
68 } 68 }
69 69
70 string[] configFiles = Directory.GetFiles(regionConfigPath, "*.xml"); 70 string[] configFiles = Directory.GetFiles(regionConfigPath, "*.xml");
71//// Causes problems with the actual .ini files if they are in the same place. 71
72//// Coz it tries to load each .ini section as a sim, and hangs. 72 string[] iniFiles = Directory.GetFiles(regionConfigPath, "*.ini");
73//// string[] iniFiles = Directory.GetFiles(regionConfigPath, "*.ini");
74 73
75 // Create an empty Regions.xml if there are no existing config files. 74 // Create an empty Regions.xml if there are no existing config files.
76 if (!allowRegionless && configFiles.Length == 0 /*&& iniFiles.Length == 0*/) 75 if (!allowRegionless && configFiles.Length == 0 /*&& iniFiles.Length == 0*/)
@@ -84,7 +83,18 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
84 List<RegionInfo> regionInfos = new List<RegionInfo>(); 83 List<RegionInfo> regionInfos = new List<RegionInfo>();
85 84
86 int i = 0; 85 int i = 0;
87/* 86
87 IConfig regionConfig = (IConfig)m_configSource.Configs["Region"];
88 string name = regionConfig.GetString("RegionName", string.Empty).Trim();
89 if (string.Empty != name)
90 {
91 RegionInfo regionInfo = new RegionInfo("REGION CONFIG #" + (i + 1), string.Empty, false, m_configSource, name);
92 regionInfos.Add(regionInfo);
93
94 m_log.InfoFormat("[REGION LOADER FILE SYSTEM]: Loaded config for region {0}", regionInfo.RegionName);
95 i++;
96 }
97
88 foreach (string file in iniFiles) 98 foreach (string file in iniFiles)
89 { 99 {
90 m_log.InfoFormat("[REGION LOADER FILE SYSTEM]: Loading config file {0}", file); 100 m_log.InfoFormat("[REGION LOADER FILE SYSTEM]: Loading config file {0}", file);
@@ -101,7 +111,7 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
101 i++; 111 i++;
102 } 112 }
103 } 113 }
104*/ 114
105 foreach (string file in configFiles) 115 foreach (string file in configFiles)
106 { 116 {
107 m_log.InfoFormat("[REGION LOADER FILE SYSTEM]: Loading config file {0}", file); 117 m_log.InfoFormat("[REGION LOADER FILE SYSTEM]: Loading config file {0}", file);