OpenSim
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
RegionInfo.cs
Go to the documentation of this file.
1 /*
2  * Copyright (c) Contributors, http://opensimulator.org/
3  * See CONTRIBUTORS.TXT for a full list of copyright holders.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are met:
7  * * Redistributions of source code must retain the above copyright
8  * notice, this list of conditions and the following disclaimer.
9  * * Redistributions in binary form must reproduce the above copyright
10  * notice, this list of conditions and the following disclaimer in the
11  * documentation and/or other materials provided with the distribution.
12  * * Neither the name of the OpenSimulator Project nor the
13  * names of its contributors may be used to endorse or promote products
14  * derived from this software without specific prior written permission.
15  *
16  * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19  * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26  */
27 
28 using System;
29 using System.Collections.Generic;
30 using System.Net;
31 using System.Net.Sockets;
32 using System.Reflection;
33 using System.Xml;
34 using System.IO;
35 using log4net;
36 using Nini.Config;
37 using OpenMetaverse;
38 using OpenMetaverse.StructuredData;
39 //using OpenSim.Framework.Console;
40 
41 namespace OpenSim.Framework
42 {
43  [Serializable]
44  public class RegionLightShareData : ICloneable
45  {
46  public bool valid = false;
47  public UUID regionID = UUID.Zero;
48  public Vector3 waterColor = new Vector3(4.0f,38.0f,64.0f);
49  public float waterFogDensityExponent = 4.0f;
50  public float underwaterFogModifier = 0.25f;
51  public Vector3 reflectionWaveletScale = new Vector3(2.0f,2.0f,2.0f);
52  public float fresnelScale = 0.40f;
53  public float fresnelOffset = 0.50f;
54  public float refractScaleAbove = 0.03f;
55  public float refractScaleBelow = 0.20f;
56  public float blurMultiplier = 0.040f;
57  public Vector2 bigWaveDirection = new Vector2(1.05f,-0.42f);
58  public Vector2 littleWaveDirection = new Vector2(1.11f,-1.16f);
59  public UUID normalMapTexture = new UUID("822ded49-9a6c-f61c-cb89-6df54f42cdf4");
60  public Vector4 horizon = new Vector4(0.25f, 0.25f, 0.32f, 0.32f);
61  public float hazeHorizon = 0.19f;
62  public Vector4 blueDensity = new Vector4(0.12f, 0.22f, 0.38f, 0.38f);
63  public float hazeDensity = 0.70f;
64  public float densityMultiplier = 0.18f;
65  public float distanceMultiplier = 0.8f;
66  public UInt16 maxAltitude = 1605;
67  public Vector4 sunMoonColor = new Vector4(0.24f, 0.26f, 0.30f, 0.30f);
68  public float sunMoonPosition = 0.317f;
69  public Vector4 ambient = new Vector4(0.35f,0.35f,0.35f,0.35f);
70  public float eastAngle = 0.0f;
71  public float sunGlowFocus = 0.10f;
72  public float sunGlowSize = 1.75f;
73  public float sceneGamma = 1.0f;
74  public float starBrightness = 0.0f;
75  public Vector4 cloudColor = new Vector4(0.41f, 0.41f, 0.41f, 0.41f);
76  public Vector3 cloudXYDensity = new Vector3(1.00f, 0.53f, 1.00f);
77  public float cloudCoverage = 0.27f;
78  public float cloudScale = 0.42f;
79  public Vector3 cloudDetailXYDensity = new Vector3(1.00f, 0.53f, 0.12f);
80  public float cloudScrollX = 0.20f;
81  public bool cloudScrollXLock = false;
82  public float cloudScrollY = 0.01f;
83  public bool cloudScrollYLock = false;
84  public bool drawClassicClouds = true;
85 
86  public delegate void SaveDelegate(RegionLightShareData wl);
87  public event SaveDelegate OnSave;
88  public void Save()
89  {
90  if (OnSave != null)
91  OnSave(this);
92  }
93  public object Clone()
94  {
95  return this.MemberwiseClone(); // call clone method
96  }
97 
98  }
99 
100  public class RegionInfo
101  {
102  private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
103  private static readonly string LogHeader = "[REGION INFO]";
104 
105 
106  public bool commFailTF = false;
108  public string DataStore = String.Empty;
109 
110  public string RegionFile = String.Empty;
111  public bool isSandbox = false;
112  public bool Persistent = true;
113 
114  private EstateSettings m_estateSettings;
115  private RegionSettings m_regionSettings;
116  // private IConfigSource m_configSource = null;
117 
118  public UUID originRegionID = UUID.Zero;
119  public string proxyUrl = "";
120  public int ProxyOffset = 0;
121  public string regionSecret = UUID.Random().ToString();
122 
123  public string osSecret;
124 
125  public UUID lastMapUUID = UUID.Zero;
126  public string lastMapRefresh = "0";
127 
128  private float m_nonphysPrimMin = 0;
129  private int m_nonphysPrimMax = 0;
130  private float m_physPrimMin = 0;
131  private int m_physPrimMax = 0;
132  private bool m_clampPrimSize = false;
133  private int m_objectCapacity = 0;
134  private int m_maxPrimsPerUser = -1;
135  private int m_linksetCapacity = 0;
136  private string m_regionType = String.Empty;
137  private RegionLightShareData m_windlight = new RegionLightShareData();
138  protected uint m_httpPort;
139  protected string m_serverURI;
140  protected string m_regionName = String.Empty;
141  protected bool Allow_Alternate_Ports;
143  protected string m_externalHostName;
144  protected IPEndPoint m_internalEndPoint;
145  protected uint m_remotingPort;
146  public UUID RegionID = UUID.Zero;
147  public string RemotingAddress;
148  public UUID ScopeID = UUID.Zero;
149  private UUID m_maptileStaticUUID = UUID.Zero;
150 
151  public uint WorldLocX = 0;
152  public uint WorldLocY = 0;
153  public uint WorldLocZ = 0;
154 
161  public uint RegionSizeX = Constants.RegionSize;
162 
169  public uint RegionSizeY = Constants.RegionSize;
170 
177  public uint RegionSizeZ = Constants.RegionHeight;
178 
179  private Dictionary<String, String> m_extraSettings = new Dictionary<string, string>();
180 
181  // Apparently, we're applying the same estatesettings regardless of whether it's local or remote.
182 
183  // MT: Yes. Estates can't span trust boundaries. Therefore, it can be
184  // assumed that all instances belonging to one estate are able to
185  // access the same database server. Since estate settings are lodaed
186  // from there, that should be sufficient for full remote administration
187 
188  // File based loading
189  //
190  public RegionInfo(string description, string filename, bool skipConsoleConfig, IConfigSource configSource) : this(description, filename, skipConsoleConfig, configSource, String.Empty)
191  {
192  }
193 
194  public RegionInfo(string description, string filename, bool skipConsoleConfig, IConfigSource configSource, string configName)
195  {
196  // m_configSource = configSource;
197 
198  if (filename.ToLower().EndsWith(".ini"))
199  {
200  if (!File.Exists(filename)) // New region config request
201  {
202  IniConfigSource newFile = new IniConfigSource();
203  ReadNiniConfig(newFile, configName);
204 
205  newFile.Save(filename);
206 
207  RegionFile = filename;
208 
209  return;
210  }
211 
212  IniConfigSource source = new IniConfigSource(filename);
213 
214  bool saveFile = false;
215  if (source.Configs[configName] == null)
216  saveFile = true;
217 
218  ReadNiniConfig(source, configName);
219 
220  if (configName != String.Empty && saveFile)
221  source.Save(filename);
222 
223  RegionFile = filename;
224 
225  return;
226  }
227 
228  try
229  {
230  // This will throw if it's not legal Nini XML format
231  //
232  IConfigSource xmlsource = new XmlConfigSource(filename);
233 
234  ReadNiniConfig(xmlsource, configName);
235 
236  RegionFile = filename;
237 
238  return;
239  }
240  catch (Exception)
241  {
242  }
243  }
244 
245  // The web loader uses this
246  //
247  public RegionInfo(string description, XmlNode xmlNode, bool skipConsoleConfig, IConfigSource configSource)
248  {
249  XmlElement elem = (XmlElement)xmlNode;
250  string name = elem.GetAttribute("Name");
251  string xmlstr = "<Nini>" + xmlNode.OuterXml + "</Nini>";
252  XmlConfigSource source = new XmlConfigSource(XmlReader.Create(new StringReader(xmlstr)));
253  ReadNiniConfig(source, name);
254 
255  m_serverURI = string.Empty;
256  }
257 
258  public RegionInfo(uint legacyRegionLocX, uint legacyRegionLocY, IPEndPoint internalEndPoint, string externalUri)
259  {
260  RegionLocX = legacyRegionLocX;
261  RegionLocY = legacyRegionLocY;
262  RegionSizeX = Constants.RegionSize;
263  RegionSizeY = Constants.RegionSize;
264  m_internalEndPoint = internalEndPoint;
265  m_externalHostName = externalUri;
266  m_serverURI = string.Empty;
267  }
268 
269  public RegionInfo()
270  {
271  m_serverURI = string.Empty;
272  }
273 
275  {
276  get
277  {
278  if (m_estateSettings == null)
279  {
280  m_estateSettings = new EstateSettings();
281  }
282 
283  return m_estateSettings;
284  }
285 
286  set { m_estateSettings = value; }
287  }
288 
290  {
291  get
292  {
293  if (m_regionSettings == null)
294  {
295  m_regionSettings = new RegionSettings();
296  }
297 
298  return m_regionSettings;
299  }
300 
301  set { m_regionSettings = value; }
302  }
303 
304  public RegionLightShareData WindlightSettings
305  {
306  get
307  {
308  if (m_windlight == null)
309  {
310  m_windlight = new RegionLightShareData();
311  }
312 
313  return m_windlight;
314  }
315 
316  set { m_windlight = value; }
317  }
318 
319  public float NonphysPrimMin
320  {
321  get { return m_nonphysPrimMin; }
322  }
323 
324  public int NonphysPrimMax
325  {
326  get { return m_nonphysPrimMax; }
327  }
328 
329  public float PhysPrimMin
330  {
331  get { return m_physPrimMin; }
332  }
333 
334  public int PhysPrimMax
335  {
336  get { return m_physPrimMax; }
337  }
338 
339  public bool ClampPrimSize
340  {
341  get { return m_clampPrimSize; }
342  }
343 
344  public int ObjectCapacity
345  {
346  get { return m_objectCapacity; }
347  }
348 
349  public int MaxPrimsPerUser
350  {
351  get { return m_maxPrimsPerUser; }
352  }
353 
354  public int LinksetCapacity
355  {
356  get { return m_linksetCapacity; }
357  }
358 
359  public int AgentCapacity { get; set; }
360 
361  public byte AccessLevel
362  {
363  get { return (byte)Util.ConvertMaturityToAccessLevel((uint)RegionSettings.Maturity); }
364  }
365 
366  public string RegionType
367  {
368  get { return m_regionType; }
369  }
370 
371  public UUID MaptileStaticUUID
372  {
373  get { return m_maptileStaticUUID; }
374  }
375 
376  public string MaptileStaticFile { get; private set; }
377 
381  public uint HttpPort
382  {
383  get { return m_httpPort; }
384  set { m_httpPort = value; }
385  }
386 
390 
391  public string ServerURI
392  {
393  get {
394  if ( m_serverURI != string.Empty ) {
395  return m_serverURI;
396  } else {
397  return "http://" + m_externalHostName + ":" + m_httpPort + "/";
398  }
399  }
400  set {
401  if ( value.EndsWith("/") ) {
402  m_serverURI = value;
403  } else {
404  m_serverURI = value + '/';
405  }
406  }
407  }
408 
409  public string RegionName
410  {
411  get { return m_regionName; }
412  set { m_regionName = value; }
413  }
414 
415  public uint RemotingPort
416  {
417  get { return m_remotingPort; }
418  set { m_remotingPort = value; }
419  }
420 
426  public IPEndPoint ExternalEndPoint
427  {
428  get
429  {
430  // Old one defaults to IPv6
431  //return new IPEndPoint(Dns.GetHostAddresses(m_externalHostName)[0], m_internalEndPoint.Port);
432 
433  IPAddress ia = null;
434  // If it is already an IP, don't resolve it - just return directly
435  if (IPAddress.TryParse(m_externalHostName, out ia))
436  return new IPEndPoint(ia, m_internalEndPoint.Port);
437 
438  // Reset for next check
439  ia = null;
440  try
441  {
442  foreach (IPAddress Adr in Dns.GetHostAddresses(m_externalHostName))
443  {
444  if (ia == null)
445  ia = Adr;
446 
447  if (Adr.AddressFamily == AddressFamily.InterNetwork)
448  {
449  ia = Adr;
450  break;
451  }
452  }
453  }
454  catch (SocketException e)
455  {
456  throw new Exception(
457  "Unable to resolve local hostname " + m_externalHostName + " innerException of type '" +
458  e + "' attached to this exception", e);
459  }
460 
461  return new IPEndPoint(ia, m_internalEndPoint.Port);
462  }
463 
464  set { m_externalHostName = value.ToString(); }
465  }
466 
467  public string ExternalHostName
468  {
469  get { return m_externalHostName; }
470  set { m_externalHostName = value; }
471  }
472 
473  public IPEndPoint InternalEndPoint
474  {
475  get { return m_internalEndPoint; }
476  set { m_internalEndPoint = value; }
477  }
478 
484  public uint RegionLocX
485  {
486  get { return WorldLocX / Constants.RegionSize; }
487  set { WorldLocX = value * Constants.RegionSize; }
488  }
489 
495  public uint RegionLocY
496  {
497  get { return WorldLocY / Constants.RegionSize; }
498  set { WorldLocY = value * Constants.RegionSize; }
499  }
500 
501  public void SetDefaultRegionSize()
502  {
503  WorldLocX = 0;
504  WorldLocY = 0;
505  WorldLocZ = 0;
506  RegionSizeX = Constants.RegionSize;
507  RegionSizeY = Constants.RegionSize;
508  RegionSizeZ = Constants.RegionHeight;
509  }
510 
511  // A unique region handle is created from the region's world coordinates.
512  // This cannot be changed because some code expects to receive the region handle and then
513  // compute the region coordinates from it.
514  public ulong RegionHandle
515  {
516  get { return Util.UIntsToLong(WorldLocX, WorldLocY); }
517  }
518 
519  public void SetEndPoint(string ipaddr, int port)
520  {
521  IPAddress tmpIP = IPAddress.Parse(ipaddr);
522  IPEndPoint tmpEPE = new IPEndPoint(tmpIP, port);
523  m_internalEndPoint = tmpEPE;
524  }
525 
526  public string GetSetting(string key)
527  {
528  string val;
529  string keylower = key.ToLower();
530  if (m_extraSettings.TryGetValue(keylower, out val))
531  return val;
532  m_log.DebugFormat("[RegionInfo] Could not locate value for parameter {0}", key);
533  return null;
534  }
535 
536  public void SetExtraSetting(string key, string value)
537  {
538  string keylower = key.ToLower();
539  m_extraSettings[keylower] = value;
540  }
541 
542  private void ReadNiniConfig(IConfigSource source, string name)
543  {
544 // bool creatingNew = false;
545 
546  if (source.Configs.Count == 0)
547  {
548  MainConsole.Instance.Output("=====================================\n");
549  MainConsole.Instance.Output("We are now going to ask a couple of questions about your region.\n");
550  MainConsole.Instance.Output("You can press 'enter' without typing anything to use the default\n");
551  MainConsole.Instance.Output("the default is displayed between [ ] brackets.\n");
552  MainConsole.Instance.Output("=====================================\n");
553 
554  if (name == String.Empty)
555  {
556  while (name.Trim() == string.Empty)
557  {
558  name = MainConsole.Instance.CmdPrompt("New region name", name);
559  if (name.Trim() == string.Empty)
560  {
561  MainConsole.Instance.Output("Cannot interactively create region with no name");
562  }
563  }
564  }
565 
566  source.AddConfig(name);
567 
568 // creatingNew = true;
569  }
570 
571  if (name == String.Empty)
572  name = source.Configs[0].Name;
573 
574  if (source.Configs[name] == null)
575  {
576  source.AddConfig(name);
577  }
578 
579  RegionName = name;
580  IConfig config = source.Configs[name];
581 
582  // Track all of the keys in this config and remove as they are processed
583  // The remaining keys will be added to generic key-value storage for
584  // whoever might need it
585  HashSet<String> allKeys = new HashSet<String>();
586  foreach (string s in config.GetKeys())
587  {
588  allKeys.Add(s);
589  }
590 
591  // RegionUUID
592  //
593  allKeys.Remove("RegionUUID");
594  string regionUUID = config.GetString("RegionUUID", string.Empty);
595  if (!UUID.TryParse(regionUUID.Trim(), out RegionID))
596  {
597  UUID newID = UUID.Random();
598  while (RegionID == UUID.Zero)
599  {
600  regionUUID = MainConsole.Instance.CmdPrompt("RegionUUID", newID.ToString());
601  if (!UUID.TryParse(regionUUID.Trim(), out RegionID))
602  {
603  MainConsole.Instance.Output("RegionUUID must be a valid UUID");
604  }
605  }
606  config.Set("RegionUUID", regionUUID);
607  }
608 
609  originRegionID = RegionID; // What IS this?! (Needed for RegionCombinerModule?)
610 
611  // Location
612  //
613  allKeys.Remove("Location");
614  string location = config.GetString("Location", String.Empty);
615  if (location == String.Empty)
616  {
617  location = MainConsole.Instance.CmdPrompt("Region Location", "1000,1000");
618  config.Set("Location", location);
619  }
620 
621  string[] locationElements = location.Split(new char[] {','});
622 
623  RegionLocX = Convert.ToUInt32(locationElements[0]);
624  RegionLocY = Convert.ToUInt32(locationElements[1]);
625 
626  // Region size
627  // Default to legacy region size if not specified.
628  allKeys.Remove("SizeX");
629  string configSizeX = config.GetString("SizeX", Constants.RegionSize.ToString());
630  config.Set("SizeX", configSizeX);
631  RegionSizeX = Convert.ToUInt32(configSizeX);
632  allKeys.Remove("SizeY");
633  string configSizeY = config.GetString("SizeY", Constants.RegionSize.ToString());
634  config.Set("SizeY", configSizeX);
635  RegionSizeY = Convert.ToUInt32(configSizeY);
636  allKeys.Remove("SizeZ");
637  string configSizeZ = config.GetString("SizeZ", Constants.RegionHeight.ToString());
638  config.Set("SizeZ", configSizeX);
639  RegionSizeZ = Convert.ToUInt32(configSizeZ);
640 
641  DoRegionSizeSanityChecks();
642 
643  // InternalAddress
644  //
645  IPAddress address;
646  allKeys.Remove("InternalAddress");
647  if (config.Contains("InternalAddress"))
648  {
649  address = IPAddress.Parse(config.GetString("InternalAddress", String.Empty));
650  }
651  else
652  {
653  address = IPAddress.Parse(MainConsole.Instance.CmdPrompt("Internal IP address", "0.0.0.0"));
654  config.Set("InternalAddress", address.ToString());
655  }
656 
657  // InternalPort
658  //
659  int port;
660  allKeys.Remove("InternalPort");
661  if (config.Contains("InternalPort"))
662  {
663  port = config.GetInt("InternalPort", 9000);
664  }
665  else
666  {
667  port = Convert.ToInt32(MainConsole.Instance.CmdPrompt("Internal port", "9000"));
668  config.Set("InternalPort", port);
669  }
670  m_internalEndPoint = new IPEndPoint(address, port);
671 
672  // AllowAlternatePorts
673  //
674  allKeys.Remove("AllowAlternatePorts");
675  if (config.Contains("AllowAlternatePorts"))
676  {
677  m_allow_alternate_ports = config.GetBoolean("AllowAlternatePorts", true);
678  }
679  else
680  {
681  m_allow_alternate_ports = Convert.ToBoolean(MainConsole.Instance.CmdPrompt("Allow alternate ports", "False"));
682 
683  config.Set("AllowAlternatePorts", m_allow_alternate_ports.ToString());
684  }
685 
686  // ExternalHostName
687  //
688  allKeys.Remove("ExternalHostName");
689  string externalName;
690  if (config.Contains("ExternalHostName"))
691  {
692  externalName = config.GetString("ExternalHostName", "SYSTEMIP");
693  }
694  else
695  {
696  externalName = MainConsole.Instance.CmdPrompt("External host name", "SYSTEMIP");
697  config.Set("ExternalHostName", externalName);
698  }
699  if (externalName == "SYSTEMIP")
700  {
701  m_externalHostName = Util.GetLocalHost().ToString();
702  m_log.InfoFormat(
703  "[REGIONINFO]: Resolving SYSTEMIP to {0} for external hostname of region {1}",
704  m_externalHostName, name);
705  }
706  else
707  {
708  m_externalHostName = externalName;
709  }
710 
711  // RegionType
712  m_regionType = config.GetString("RegionType", String.Empty);
713  allKeys.Remove("RegionType");
714 
715  #region Prim and map stuff
716 
717  m_nonphysPrimMin = config.GetFloat("NonPhysicalPrimMin", 0);
718  allKeys.Remove("NonPhysicalPrimMin");
719 
720  m_nonphysPrimMax = config.GetInt("NonPhysicalPrimMax", 0);
721  allKeys.Remove("NonPhysicalPrimMax");
722 
723  m_physPrimMin = config.GetFloat("PhysicalPrimMin", 0);
724  allKeys.Remove("PhysicalPrimMin");
725 
726  m_physPrimMax = config.GetInt("PhysicalPrimMax", 0);
727  allKeys.Remove("PhysicalPrimMax");
728 
729  m_clampPrimSize = config.GetBoolean("ClampPrimSize", false);
730  allKeys.Remove("ClampPrimSize");
731 
732  m_objectCapacity = config.GetInt("MaxPrims", 15000);
733  allKeys.Remove("MaxPrims");
734 
735  m_maxPrimsPerUser = config.GetInt("MaxPrimsPerUser", -1);
736  allKeys.Remove("MaxPrimsPerUser");
737 
738  m_linksetCapacity = config.GetInt("LinksetPrims", 0);
739  allKeys.Remove("LinksetPrims");
740 
741  allKeys.Remove("MaptileStaticUUID");
742  string mapTileStaticUUID = config.GetString("MaptileStaticUUID", UUID.Zero.ToString());
743  if (UUID.TryParse(mapTileStaticUUID.Trim(), out m_maptileStaticUUID))
744  {
745  config.Set("MaptileStaticUUID", m_maptileStaticUUID.ToString());
746  }
747 
748  MaptileStaticFile = config.GetString("MaptileStaticFile", String.Empty);
749  allKeys.Remove("MaptileStaticFile");
750 
751  #endregion
752 
753  AgentCapacity = config.GetInt("MaxAgents", 100);
754  allKeys.Remove("MaxAgents");
755 
756  // Multi-tenancy
757  //
758  ScopeID = new UUID(config.GetString("ScopeID", UUID.Zero.ToString()));
759  allKeys.Remove("ScopeID");
760 
761  foreach (String s in allKeys)
762  {
763  SetExtraSetting(s, config.GetString(s));
764  }
765  }
766 
767  // Make sure user specified region sizes are sane.
768  // Must be multiples of legacy region size (256).
769  private void DoRegionSizeSanityChecks()
770  {
771  if (RegionSizeX != Constants.RegionSize || RegionSizeY != Constants.RegionSize)
772  {
773  // Doing non-legacy region sizes.
774  // Enforce region size to be multiples of the legacy region size (256)
775  uint partial = RegionSizeX % Constants.RegionSize;
776  if (partial != 0)
777  {
778  RegionSizeX -= partial;
779  if (RegionSizeX == 0)
780  RegionSizeX = Constants.RegionSize;
781  m_log.ErrorFormat("{0} Region size must be multiple of {1}. Enforcing {2}.RegionSizeX={3} instead of specified {4}",
782  LogHeader, Constants.RegionSize, m_regionName, RegionSizeX, RegionSizeX + partial);
783  }
784  partial = RegionSizeY % Constants.RegionSize;
785  if (partial != 0)
786  {
787  RegionSizeY -= partial;
788  if (RegionSizeY == 0)
789  RegionSizeY = Constants.RegionSize;
790  m_log.ErrorFormat("{0} Region size must be multiple of {1}. Enforcing {2}.RegionSizeY={3} instead of specified {4}",
791  LogHeader, Constants.RegionSize, m_regionName, RegionSizeY, RegionSizeY + partial);
792  }
793 
794  // Because of things in the viewer, regions MUST be square.
795  // Remove this check when viewers have been updated.
796  if (RegionSizeX != RegionSizeY)
797  {
798  uint minSize = Math.Min(RegionSizeX, RegionSizeY);
799  RegionSizeX = minSize;
800  RegionSizeY = minSize;
801  m_log.ErrorFormat("{0} Regions must be square until viewers are updated. Forcing region {1} size to <{2},{3}>",
802  LogHeader, m_regionName, RegionSizeX, RegionSizeY);
803  }
804 
805  // There is a practical limit to region size.
806  if (RegionSizeX > Constants.MaximumRegionSize || RegionSizeY > Constants.MaximumRegionSize)
807  {
808  RegionSizeX = Util.Clamp<uint>(RegionSizeX, Constants.RegionSize, Constants.MaximumRegionSize);
809  RegionSizeY = Util.Clamp<uint>(RegionSizeY, Constants.RegionSize, Constants.MaximumRegionSize);
810  m_log.ErrorFormat("{0} Region dimensions must be less than {1}. Clamping {2}'s size to <{3},{4}>",
811  LogHeader, Constants.MaximumRegionSize, m_regionName, RegionSizeX, RegionSizeY);
812  }
813 
814  m_log.InfoFormat("{0} Region {1} size set to <{2},{3}>", LogHeader, m_regionName, RegionSizeX, RegionSizeY);
815  }
816  }
817 
818  private void WriteNiniConfig(IConfigSource source)
819  {
820  IConfig config = source.Configs[RegionName];
821 
822  if (config != null)
823  source.Configs.Remove(config);
824 
825  config = source.AddConfig(RegionName);
826 
827  config.Set("RegionUUID", RegionID.ToString());
828 
829  string location = String.Format("{0},{1}", RegionLocX, RegionLocY);
830  config.Set("Location", location);
831 
832  if (DataStore != String.Empty)
833  config.Set("Datastore", DataStore);
834 
835  if (RegionSizeX != Constants.RegionSize || RegionSizeY != Constants.RegionSize)
836  {
837  config.Set("SizeX", RegionSizeX);
838  config.Set("SizeY", RegionSizeY);
839  // if (RegionSizeZ > 0)
840  // config.Set("SizeZ", RegionSizeZ);
841  }
842 
843  config.Set("InternalAddress", m_internalEndPoint.Address.ToString());
844  config.Set("InternalPort", m_internalEndPoint.Port);
845 
846  config.Set("AllowAlternatePorts", m_allow_alternate_ports.ToString());
847 
848  config.Set("ExternalHostName", m_externalHostName);
849 
850  if (m_nonphysPrimMin > 0)
851  config.Set("NonphysicalPrimMax", m_nonphysPrimMin);
852 
853  if (m_nonphysPrimMax > 0)
854  config.Set("NonphysicalPrimMax", m_nonphysPrimMax);
855 
856  if (m_physPrimMin > 0)
857  config.Set("PhysicalPrimMax", m_physPrimMin);
858 
859  if (m_physPrimMax > 0)
860  config.Set("PhysicalPrimMax", m_physPrimMax);
861 
862  config.Set("ClampPrimSize", m_clampPrimSize.ToString());
863 
864  if (m_objectCapacity > 0)
865  config.Set("MaxPrims", m_objectCapacity);
866 
867  if (m_maxPrimsPerUser > -1)
868  config.Set("MaxPrimsPerUser", m_maxPrimsPerUser);
869 
870  if (m_linksetCapacity > 0)
871  config.Set("LinksetPrims", m_linksetCapacity);
872 
873  if (AgentCapacity > 0)
874  config.Set("MaxAgents", AgentCapacity);
875 
876  if (ScopeID != UUID.Zero)
877  config.Set("ScopeID", ScopeID.ToString());
878 
879  if (RegionType != String.Empty)
880  config.Set("RegionType", RegionType);
881 
882  if (m_maptileStaticUUID != UUID.Zero)
883  config.Set("MaptileStaticUUID", m_maptileStaticUUID.ToString());
884 
885  if (MaptileStaticFile != null && MaptileStaticFile != String.Empty)
886  config.Set("MaptileStaticFile", MaptileStaticFile);
887  }
888 
889  public void SaveRegionToFile(string description, string filename)
890  {
891  if (filename.ToLower().EndsWith(".ini"))
892  {
893  IniConfigSource source = new IniConfigSource();
894  try
895  {
896  source = new IniConfigSource(filename); // Load if it exists
897  }
898  catch (Exception)
899  {
900  }
901 
902  WriteNiniConfig(source);
903 
904  source.Save(filename);
905 
906  return;
907  }
908  else
909  throw new Exception("Invalid file type for region persistence.");
910  }
911 
913  {
914  configMember.addConfigurationOption("sim_UUID", ConfigurationOption.ConfigurationTypes.TYPE_UUID_NULL_FREE,
915  "UUID of Region (Default is recommended, random UUID)",
916  RegionID.ToString(), true);
917  configMember.addConfigurationOption("sim_name", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
918  "Region Name", RegionName, true);
919 
920  configMember.addConfigurationOption("sim_location_x", ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
921  "Grid Location (X Axis)", RegionLocX.ToString(), true);
922  configMember.addConfigurationOption("sim_location_y", ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
923  "Grid Location (Y Axis)", RegionLocY.ToString(), true);
924  configMember.addConfigurationOption("sim_size_x", ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
925  "Size of region in X dimension", RegionSizeX.ToString(), true);
926  configMember.addConfigurationOption("sim_size_y", ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
927  "Size of region in Y dimension", RegionSizeY.ToString(), true);
928  configMember.addConfigurationOption("sim_size_z", ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
929  "Size of region in Z dimension", RegionSizeZ.ToString(), true);
930 
931  //m_configMember.addConfigurationOption("datastore", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Filename for local storage", "OpenSim.db", false);
932  configMember.addConfigurationOption("internal_ip_address",
933  ConfigurationOption.ConfigurationTypes.TYPE_IP_ADDRESS,
934  "Internal IP Address for incoming UDP client connections",
935  m_internalEndPoint.Address.ToString(),
936  true);
937  configMember.addConfigurationOption("internal_ip_port", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
938  "Internal IP Port for incoming UDP client connections",
939  m_internalEndPoint.Port.ToString(), true);
940  configMember.addConfigurationOption("allow_alternate_ports",
941  ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN,
942  "Allow sim to find alternate UDP ports when ports are in use?",
943  m_allow_alternate_ports.ToString(), true);
944  configMember.addConfigurationOption("external_host_name",
945  ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
946  "External Host Name", m_externalHostName, true);
947  configMember.addConfigurationOption("lastmap_uuid", ConfigurationOption.ConfigurationTypes.TYPE_UUID,
948  "Last Map UUID", lastMapUUID.ToString(), true);
949  configMember.addConfigurationOption("lastmap_refresh", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
950  "Last Map Refresh", Util.UnixTimeSinceEpoch().ToString(), true);
951 
952  configMember.addConfigurationOption("nonphysical_prim_min", ConfigurationOption.ConfigurationTypes.TYPE_FLOAT,
953  "Minimum size for nonphysical prims", m_nonphysPrimMin.ToString(), true);
954 
955  configMember.addConfigurationOption("nonphysical_prim_max", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
956  "Maximum size for nonphysical prims", m_nonphysPrimMax.ToString(), true);
957 
958  configMember.addConfigurationOption("physical_prim_min", ConfigurationOption.ConfigurationTypes.TYPE_FLOAT,
959  "Minimum size for nonphysical prims", m_physPrimMin.ToString(), true);
960 
961  configMember.addConfigurationOption("physical_prim_max", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
962  "Maximum size for physical prims", m_physPrimMax.ToString(), true);
963 
964  configMember.addConfigurationOption("clamp_prim_size", ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN,
965  "Clamp prims to max size", m_clampPrimSize.ToString(), true);
966 
967  configMember.addConfigurationOption("object_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
968  "Max objects this sim will hold", m_objectCapacity.ToString(), true);
969 
970  configMember.addConfigurationOption("linkset_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
971  "Max prims an object will hold", m_linksetCapacity.ToString(), true);
972 
973  configMember.addConfigurationOption("agent_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
974  "Max avatars this sim will hold",AgentCapacity.ToString(), true);
975 
976  configMember.addConfigurationOption("scope_id", ConfigurationOption.ConfigurationTypes.TYPE_UUID,
977  "Scope ID for this region", ScopeID.ToString(), true);
978 
979  configMember.addConfigurationOption("region_type", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
980  "Free form string describing the type of region", String.Empty, true);
981 
982  configMember.addConfigurationOption("region_static_maptile", ConfigurationOption.ConfigurationTypes.TYPE_UUID,
983  "UUID of a texture to use as the map for this region", m_maptileStaticUUID.ToString(), true);
984  }
985 
987  {
988  configMember.addConfigurationOption("sim_UUID", ConfigurationOption.ConfigurationTypes.TYPE_UUID,
989  "UUID of Region (Default is recommended, random UUID)",
990  UUID.Random().ToString(), true);
991  configMember.addConfigurationOption("sim_name", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
992  "Region Name", "OpenSim Test", false);
993 
994  configMember.addConfigurationOption("sim_location_x", ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
995  "Grid Location (X Axis)", "1000", false);
996  configMember.addConfigurationOption("sim_location_y", ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
997  "Grid Location (Y Axis)", "1000", false);
998  configMember.addConfigurationOption("sim_size_x", ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
999  "Size of region in X dimension", Constants.RegionSize.ToString(), false);
1000  configMember.addConfigurationOption("sim_size_y", ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
1001  "Size of region in Y dimension", Constants.RegionSize.ToString(), false);
1002  configMember.addConfigurationOption("sim_size_z", ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
1003  "Size of region in Z dimension", Constants.RegionHeight.ToString(), false);
1004 
1005  //m_configMember.addConfigurationOption("datastore", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Filename for local storage", "OpenSim.db", false);
1006  configMember.addConfigurationOption("internal_ip_address",
1007  ConfigurationOption.ConfigurationTypes.TYPE_IP_ADDRESS,
1008  "Internal IP Address for incoming UDP client connections", "0.0.0.0",
1009  false);
1010  configMember.addConfigurationOption("internal_ip_port", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
1011  "Internal IP Port for incoming UDP client connections",
1012  ConfigSettings.DefaultRegionHttpPort.ToString(), false);
1013  configMember.addConfigurationOption("allow_alternate_ports", ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN,
1014  "Allow sim to find alternate UDP ports when ports are in use?",
1015  "false", true);
1016  configMember.addConfigurationOption("external_host_name",
1017  ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
1018  "External Host Name", "127.0.0.1", false);
1019  configMember.addConfigurationOption("lastmap_uuid", ConfigurationOption.ConfigurationTypes.TYPE_UUID,
1020  "Last Map UUID", lastMapUUID.ToString(), true);
1021 
1022  configMember.addConfigurationOption("lastmap_refresh", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
1023  "Last Map Refresh", Util.UnixTimeSinceEpoch().ToString(), true);
1024 
1025  configMember.addConfigurationOption("nonphysical_prim_max", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
1026  "Maximum size for nonphysical prims", "0", true);
1027 
1028  configMember.addConfigurationOption("physical_prim_max", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
1029  "Maximum size for physical prims", "0", true);
1030 
1031  configMember.addConfigurationOption("clamp_prim_size", ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN,
1032  "Clamp prims to max size", "false", true);
1033 
1034  configMember.addConfigurationOption("object_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
1035  "Max objects this sim will hold", "15000", true);
1036 
1037  configMember.addConfigurationOption("agent_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
1038  "Max avatars this sim will hold", "100", true);
1039 
1040  configMember.addConfigurationOption("scope_id", ConfigurationOption.ConfigurationTypes.TYPE_UUID,
1041  "Scope ID for this region", UUID.Zero.ToString(), true);
1042 
1043  configMember.addConfigurationOption("region_type", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
1044  "Region Type", String.Empty, true);
1045 
1046  configMember.addConfigurationOption("region_static_maptile", ConfigurationOption.ConfigurationTypes.TYPE_UUID,
1047  "UUID of a texture to use as the map for this region", String.Empty, true);
1048  }
1049 
1050  public bool handleIncomingConfiguration(string configuration_key, object configuration_result)
1051  {
1052  switch (configuration_key)
1053  {
1054  case "sim_UUID":
1055  RegionID = (UUID) configuration_result;
1056  originRegionID = (UUID) configuration_result;
1057  break;
1058  case "sim_name":
1059  RegionName = (string) configuration_result;
1060  break;
1061  case "sim_location_x":
1062  RegionLocX = (uint) configuration_result;
1063  break;
1064  case "sim_location_y":
1065  RegionLocY = (uint) configuration_result;
1066  break;
1067  case "sim_size_x":
1068  RegionSizeX = (uint) configuration_result;
1069  break;
1070  case "sim_size_y":
1071  RegionSizeY = (uint) configuration_result;
1072  break;
1073  case "sim_size_z":
1074  RegionSizeZ = (uint) configuration_result;
1075  break;
1076  case "datastore":
1077  DataStore = (string) configuration_result;
1078  break;
1079  case "internal_ip_address":
1080  IPAddress address = (IPAddress) configuration_result;
1081  m_internalEndPoint = new IPEndPoint(address, 0);
1082  break;
1083  case "internal_ip_port":
1084  m_internalEndPoint.Port = (int) configuration_result;
1085  break;
1086  case "allow_alternate_ports":
1087  m_allow_alternate_ports = (bool) configuration_result;
1088  break;
1089  case "external_host_name":
1090  if ((string) configuration_result != "SYSTEMIP")
1091  {
1092  m_externalHostName = (string) configuration_result;
1093  }
1094  else
1095  {
1096  m_externalHostName = Util.GetLocalHost().ToString();
1097  }
1098  break;
1099  case "lastmap_uuid":
1100  lastMapUUID = (UUID)configuration_result;
1101  break;
1102  case "lastmap_refresh":
1103  lastMapRefresh = (string)configuration_result;
1104  break;
1105  case "nonphysical_prim_max":
1106  m_nonphysPrimMax = (int)configuration_result;
1107  break;
1108  case "physical_prim_max":
1109  m_physPrimMax = (int)configuration_result;
1110  break;
1111  case "clamp_prim_size":
1112  m_clampPrimSize = (bool)configuration_result;
1113  break;
1114  case "object_capacity":
1115  m_objectCapacity = (int)configuration_result;
1116  break;
1117  case "linkset_capacity":
1118  m_linksetCapacity = (int)configuration_result;
1119  break;
1120  case "agent_capacity":
1121  AgentCapacity = (int)configuration_result;
1122  break;
1123  case "scope_id":
1124  ScopeID = (UUID)configuration_result;
1125  break;
1126  case "region_type":
1127  m_regionType = (string)configuration_result;
1128  break;
1129  case "region_static_maptile":
1130  m_maptileStaticUUID = (UUID)configuration_result;
1131  break;
1132  }
1133 
1134  return true;
1135  }
1136 
1137 
1138  public void SaveLastMapUUID(UUID mapUUID)
1139  {
1140  lastMapUUID = mapUUID;
1141  lastMapRefresh = Util.UnixTimeSinceEpoch().ToString();
1142  }
1143 
1145  {
1146  OSDMap args = new OSDMap();
1147  args["region_id"] = OSD.FromUUID(RegionID);
1148  if ((RegionName != null) && !RegionName.Equals(""))
1149  args["region_name"] = OSD.FromString(RegionName);
1150  args["external_host_name"] = OSD.FromString(ExternalHostName);
1151  args["http_port"] = OSD.FromString(HttpPort.ToString());
1152  args["server_uri"] = OSD.FromString(ServerURI);
1153 
1154  args["region_xloc"] = OSD.FromString(RegionLocX.ToString());
1155  args["region_yloc"] = OSD.FromString(RegionLocY.ToString());
1156  args["region_size_x"] = OSD.FromString(RegionSizeX.ToString());
1157  args["region_size_y"] = OSD.FromString(RegionSizeY.ToString());
1158  args["region_size_z"] = OSD.FromString(RegionSizeZ.ToString());
1159 
1160  args["internal_ep_address"] = OSD.FromString(InternalEndPoint.Address.ToString());
1161  args["internal_ep_port"] = OSD.FromString(InternalEndPoint.Port.ToString());
1162  if ((RemotingAddress != null) && !RemotingAddress.Equals(""))
1163  args["remoting_address"] = OSD.FromString(RemotingAddress);
1164  args["remoting_port"] = OSD.FromString(RemotingPort.ToString());
1165  args["allow_alt_ports"] = OSD.FromBoolean(m_allow_alternate_ports);
1166  if ((proxyUrl != null) && !proxyUrl.Equals(""))
1167  args["proxy_url"] = OSD.FromString(proxyUrl);
1168  if (RegionType != String.Empty)
1169  args["region_type"] = OSD.FromString(RegionType);
1170 
1171  return args;
1172  }
1173 
1174  public void UnpackRegionInfoData(OSDMap args)
1175  {
1176  if (args["region_id"] != null)
1177  RegionID = args["region_id"].AsUUID();
1178  if (args["region_name"] != null)
1179  RegionName = args["region_name"].AsString();
1180  if (args["external_host_name"] != null)
1181  ExternalHostName = args["external_host_name"].AsString();
1182  if (args["http_port"] != null)
1183  UInt32.TryParse(args["http_port"].AsString(), out m_httpPort);
1184  if (args["server_uri"] != null)
1185  ServerURI = args["server_uri"].AsString();
1186  if (args["region_xloc"] != null)
1187  {
1188  uint locx;
1189  UInt32.TryParse(args["region_xloc"].AsString(), out locx);
1190  RegionLocX = locx;
1191  }
1192  if (args["region_yloc"] != null)
1193  {
1194  uint locy;
1195  UInt32.TryParse(args["region_yloc"].AsString(), out locy);
1196  RegionLocY = locy;
1197  }
1198  if (args.ContainsKey("region_size_x"))
1199  RegionSizeX = (uint)args["region_size_x"].AsInteger();
1200  if (args.ContainsKey("region_size_y"))
1201  RegionSizeY = (uint)args["region_size_y"].AsInteger();
1202  if (args.ContainsKey("region_size_z"))
1203  RegionSizeZ = (uint)args["region_size_z"].AsInteger();
1204 
1205  IPAddress ip_addr = null;
1206  if (args["internal_ep_address"] != null)
1207  {
1208  IPAddress.TryParse(args["internal_ep_address"].AsString(), out ip_addr);
1209  }
1210  int port = 0;
1211  if (args["internal_ep_port"] != null)
1212  {
1213  Int32.TryParse(args["internal_ep_port"].AsString(), out port);
1214  }
1215  InternalEndPoint = new IPEndPoint(ip_addr, port);
1216  if (args["remoting_address"] != null)
1217  RemotingAddress = args["remoting_address"].AsString();
1218  if (args["remoting_port"] != null)
1219  UInt32.TryParse(args["remoting_port"].AsString(), out m_remotingPort);
1220  if (args["allow_alt_ports"] != null)
1221  m_allow_alternate_ports = args["allow_alt_ports"].AsBoolean();
1222  if (args["proxy_url"] != null)
1223  proxyUrl = args["proxy_url"].AsString();
1224  if (args["region_type"] != null)
1225  m_regionType = args["region_type"].AsString();
1226  }
1227 
1228  public static RegionInfo Create(UUID regionID, string regionName, uint regX, uint regY, string externalHostName, uint httpPort, uint simPort, uint remotingPort, string serverURI)
1229  {
1230  RegionInfo regionInfo;
1231  IPEndPoint neighbourInternalEndPoint = new IPEndPoint(Util.GetHostFromDNS(externalHostName), (int)simPort);
1232  regionInfo = new RegionInfo(regX, regY, neighbourInternalEndPoint, externalHostName);
1233  regionInfo.RemotingPort = remotingPort;
1234  regionInfo.RemotingAddress = externalHostName;
1235  regionInfo.HttpPort = httpPort;
1236  regionInfo.RegionID = regionID;
1237  regionInfo.RegionName = regionName;
1238  regionInfo.ServerURI = serverURI;
1239  return regionInfo;
1240  }
1241 
1243  {
1244  return m_internalEndPoint.Port;
1245  }
1246 
1247  public Dictionary<string, object> ToKeyValuePairs()
1248  {
1249  Dictionary<string, object> kvp = new Dictionary<string, object>();
1250  kvp["uuid"] = RegionID.ToString();
1251  kvp["locX"] = RegionLocX.ToString();
1252  kvp["locY"] = RegionLocY.ToString();
1253  kvp["external_ip_address"] = ExternalEndPoint.Address.ToString();
1254  kvp["external_port"] = ExternalEndPoint.Port.ToString();
1255  kvp["external_host_name"] = ExternalHostName;
1256  kvp["http_port"] = HttpPort.ToString();
1257  kvp["internal_ip_address"] = InternalEndPoint.Address.ToString();
1258  kvp["internal_port"] = InternalEndPoint.Port.ToString();
1259  kvp["alternate_ports"] = m_allow_alternate_ports.ToString();
1260  kvp["server_uri"] = ServerURI;
1261 
1262  return kvp;
1263  }
1264  }
1265 }
OpenSim.Framework.RegionInfo RegionInfo
void UnpackRegionInfoData(OSDMap args)
Definition: RegionInfo.cs:1174
void SaveRegionToFile(string description, string filename)
Definition: RegionInfo.cs:889
RegionInfo(uint legacyRegionLocX, uint legacyRegionLocY, IPEndPoint internalEndPoint, string externalUri)
Definition: RegionInfo.cs:258
ConfigurationMember configMember
Definition: RegionInfo.cs:107
OpenMetaverse.StructuredData.OSDMap OSDMap
OpenSim.Framework.RegionSettings RegionSettings
string GetSetting(string key)
Definition: RegionInfo.cs:526
OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString key
Definition: ICM_Api.cs:31
void SetEndPoint(string ipaddr, int port)
Definition: RegionInfo.cs:519
void SaveLastMapUUID(UUID mapUUID)
Definition: RegionInfo.cs:1138
RegionInfo(string description, string filename, bool skipConsoleConfig, IConfigSource configSource, string configName)
Definition: RegionInfo.cs:194
void SetExtraSetting(string key, string value)
Definition: RegionInfo.cs:536
OpenMetaverse.StructuredData.OSD OSD
RegionInfo(string description, XmlNode xmlNode, bool skipConsoleConfig, IConfigSource configSource)
Definition: RegionInfo.cs:247
static RegionInfo Create(UUID regionID, string regionName, uint regX, uint regY, string externalHostName, uint httpPort, uint simPort, uint remotingPort, string serverURI)
Definition: RegionInfo.cs:1228
bool handleIncomingConfiguration(string configuration_key, object configuration_result)
Definition: RegionInfo.cs:1050
RegionInfo(string description, string filename, bool skipConsoleConfig, IConfigSource configSource)
Definition: RegionInfo.cs:190
Dictionary< string, object > ToKeyValuePairs()
Definition: RegionInfo.cs:1247