aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authoronefang2019-05-28 06:19:38 +1000
committeronefang2019-05-28 06:19:38 +1000
commitf921cb712e67893b44496192e5297335ed65caf7 (patch)
treeb3b2782530414e23400f10ecc5b718682d2745b1 /OpenSim/Framework
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/Framework')
-rw-r--r--OpenSim/Framework/RegionInfo.cs22
1 files changed, 18 insertions, 4 deletions
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs
index 75ed999..8dac0ac 100644
--- a/OpenSim/Framework/RegionInfo.cs
+++ b/OpenSim/Framework/RegionInfo.cs
@@ -197,6 +197,12 @@ namespace OpenSim.Framework
197 { 197 {
198 // m_configSource = configSource; 198 // m_configSource = configSource;
199 199
200 if (string.Empty == filename)
201 {
202 ReadNiniConfig(configSource, "Region", configName);
203 return;
204 }
205
200 if (filename.ToLower().EndsWith(".ini")) 206 if (filename.ToLower().EndsWith(".ini"))
201 { 207 {
202 if (!File.Exists(filename)) // New region config request 208 if (!File.Exists(filename)) // New region config request
@@ -420,7 +426,7 @@ namespace OpenSim.Framework
420 set { m_remotingPort = value; } 426 set { m_remotingPort = value; }
421 } 427 }
422 428
423 429
424 /// <value> 430 /// <value>
425 /// This accessor can throw all the exceptions that Dns.GetHostAddresses can throw. 431 /// This accessor can throw all the exceptions that Dns.GetHostAddresses can throw.
426 /// 432 ///
@@ -509,6 +515,10 @@ namespace OpenSim.Framework
509 515
510 private void ReadNiniConfig(IConfigSource source, string name) 516 private void ReadNiniConfig(IConfigSource source, string name)
511 { 517 {
518 ReadNiniConfig(source, name, name);
519 }
520 private void ReadNiniConfig(IConfigSource source, string section, string name)
521 {
512 bool creatingNew = false; 522 bool creatingNew = false;
513 523
514 if (source.Configs.Count == 0) 524 if (source.Configs.Count == 0)
@@ -544,8 +554,7 @@ namespace OpenSim.Framework
544 source.AddConfig(name); 554 source.AddConfig(name);
545 } 555 }
546 556
547 RegionName = name; 557 IConfig config = source.Configs[section];
548 IConfig config = source.Configs[name];
549 558
550 // Track all of the keys in this config and remove as they are processed 559 // Track all of the keys in this config and remove as they are processed
551 // The remaining keys will be added to generic key-value storage for 560 // The remaining keys will be added to generic key-value storage for
@@ -556,6 +565,11 @@ namespace OpenSim.Framework
556 allKeys.Add(s); 565 allKeys.Add(s);
557 } 566 }
558 567
568 // RegionName
569 //
570 allKeys.Remove("RegionName");
571 RegionName = config.GetString("RegionName", name);
572
559 // RegionUUID 573 // RegionUUID
560 // 574 //
561 allKeys.Remove("RegionUUID"); 575 allKeys.Remove("RegionUUID");
@@ -670,7 +684,7 @@ namespace OpenSim.Framework
670 m_externalHostName = Util.GetLocalHost().ToString(); 684 m_externalHostName = Util.GetLocalHost().ToString();
671 m_log.InfoFormat( 685 m_log.InfoFormat(
672 "[REGIONINFO]: Resolving SYSTEMIP to {0} for external hostname of region {1}", 686 "[REGIONINFO]: Resolving SYSTEMIP to {0} for external hostname of region {1}",
673 m_externalHostName, name); 687 m_externalHostName, RegionName);
674 } 688 }
675 else if (!m_resolveAddress) 689 else if (!m_resolveAddress)
676 { 690 {