aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/ApplicationPlugins
diff options
context:
space:
mode:
authoronefang2020-09-08 21:27:36 +1000
committeronefang2020-09-08 21:27:36 +1000
commit8d7464d0de47f105d335e58183b4de658d580b34 (patch)
tree3499217cc1f1c1b87c1ca0766cc4dc949f3a102e /OpenSim/ApplicationPlugins
parent.ini files for various grids. (diff)
downloadopensim-SC-8d7464d0de47f105d335e58183b4de658d580b34.zip
opensim-SC-8d7464d0de47f105d335e58183b4de658d580b34.tar.gz
opensim-SC-8d7464d0de47f105d335e58183b4de658d580b34.tar.bz2
opensim-SC-8d7464d0de47f105d335e58183b4de658d580b34.tar.xz
Don't read .ini region files, use .xml instead. Add [Region] .ini block.
Coz OpenSim can get confused, and I have a better idea - 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')
-rw-r--r--OpenSim/ApplicationPlugins/LoadRegions/RegionLoaderFileSystem.cs23
1 files changed, 18 insertions, 5 deletions
diff --git a/OpenSim/ApplicationPlugins/LoadRegions/RegionLoaderFileSystem.cs b/OpenSim/ApplicationPlugins/LoadRegions/RegionLoaderFileSystem.cs
index 976714c..77a2c27 100644
--- a/OpenSim/ApplicationPlugins/LoadRegions/RegionLoaderFileSystem.cs
+++ b/OpenSim/ApplicationPlugins/LoadRegions/RegionLoaderFileSystem.cs
@@ -70,11 +70,11 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
70 string[] configFiles = Directory.GetFiles(regionConfigPath, "*.xml"); 70 string[] configFiles = Directory.GetFiles(regionConfigPath, "*.xml");
71 string[] iniFiles = Directory.GetFiles(regionConfigPath, "*.ini"); 71 string[] iniFiles = Directory.GetFiles(regionConfigPath, "*.ini");
72 72
73 // Create an empty Regions.ini if there are no existing config files. 73 // Create an empty Regions.xml if there are no existing config files.
74 if (!allowRegionless && configFiles.Length == 0 && iniFiles.Length == 0) 74 if (!allowRegionless && configFiles.Length == 0 /*&& iniFiles.Length == 0*/)
75 { 75 {
76 new RegionInfo("DEFAULT REGION CONFIG", Path.Combine(regionConfigPath, "Regions.ini"), false, m_configSource); 76 new RegionInfo("DEFAULT REGION CONFIG", Path.Combine(regionConfigPath, "Regions.xml"), false, m_configSource);
77 iniFiles = Directory.GetFiles(regionConfigPath, "*.ini"); 77 configFiles = Directory.GetFiles(regionConfigPath, "*.xml");
78 } 78 }
79 79
80 m_log.InfoFormat("[REGION LOADER FILE SYSTEM]: Loading config files from {0}", regionConfigPath); 80 m_log.InfoFormat("[REGION LOADER FILE SYSTEM]: Loading config files from {0}", regionConfigPath);
@@ -82,6 +82,18 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
82 List<RegionInfo> regionInfos = new List<RegionInfo>(); 82 List<RegionInfo> regionInfos = new List<RegionInfo>();
83 83
84 int i = 0; 84 int i = 0;
85
86 IConfig regionConfig = (IConfig)m_configSource.Configs["Region"];
87 string name = regionConfig.GetString("RegionName", string.Empty).Trim();
88 if (string.Empty != name)
89 {
90 RegionInfo regionInfo = new RegionInfo("REGION CONFIG #" + (i + 1), string.Empty, false, m_configSource, name);
91 regionInfos.Add(regionInfo);
92
93 m_log.InfoFormat("[REGION LOADER FILE SYSTEM]: Loaded config for region {0}", regionInfo.RegionName);
94 i++;
95 }
96
85 foreach (string file in iniFiles) 97 foreach (string file in iniFiles)
86 { 98 {
87 m_log.InfoFormat("[REGION LOADER FILE SYSTEM]: Loading config file {0}", file); 99 m_log.InfoFormat("[REGION LOADER FILE SYSTEM]: Loading config file {0}", file);
@@ -114,4 +126,5 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
114 return regionInfos.ToArray(); 126 return regionInfos.ToArray();
115 } 127 }
116 } 128 }
117} \ No newline at end of file 129}
130