aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/RegionInfo.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/RegionInfo.cs')
-rw-r--r--OpenSim/Framework/RegionInfo.cs67
1 files changed, 65 insertions, 2 deletions
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs
index dc00059..057f021 100644
--- a/OpenSim/Framework/RegionInfo.cs
+++ b/OpenSim/Framework/RegionInfo.cs
@@ -199,6 +199,7 @@ namespace OpenSim.Framework
199 public bool isSandbox = false; 199 public bool isSandbox = false;
200 private EstateSettings m_estateSettings; 200 private EstateSettings m_estateSettings;
201 private RegionSettings m_regionSettings; 201 private RegionSettings m_regionSettings;
202 private IConfigSource m_configSource = null;
202 203
203 public UUID MasterAvatarAssignedUUID = UUID.Zero; 204 public UUID MasterAvatarAssignedUUID = UUID.Zero;
204 public string MasterAvatarFirstName = String.Empty; 205 public string MasterAvatarFirstName = String.Empty;
@@ -212,6 +213,11 @@ namespace OpenSim.Framework
212 public UUID lastMapUUID = UUID.Zero; 213 public UUID lastMapUUID = UUID.Zero;
213 public string lastMapRefresh = "0"; 214 public string lastMapRefresh = "0";
214 215
216 private int m_nonphysPrimMax = 0;
217 private int m_physPrimMax = 0;
218 private bool m_clampPrimSize = false;
219 private int m_objectCapacity = 0;
220
215 // Apparently, we're applying the same estatesettings regardless of whether it's local or remote. 221 // Apparently, we're applying the same estatesettings regardless of whether it's local or remote.
216 222
217 // MT: Yes. Estates can't span trust boundaries. Therefore, it can be 223 // MT: Yes. Estates can't span trust boundaries. Therefore, it can be
@@ -219,16 +225,18 @@ namespace OpenSim.Framework
219 // access the same database server. Since estate settings are lodaed 225 // access the same database server. Since estate settings are lodaed
220 // from there, that should be sufficient for full remote administration 226 // from there, that should be sufficient for full remote administration
221 227
222 public RegionInfo(string description, string filename, bool skipConsoleConfig) 228 public RegionInfo(string description, string filename, bool skipConsoleConfig, IConfigSource configSource)
223 { 229 {
230 m_configSource = configSource;
224 configMember = 231 configMember =
225 new ConfigurationMember(filename, description, loadConfigurationOptions, handleIncomingConfiguration, !skipConsoleConfig); 232 new ConfigurationMember(filename, description, loadConfigurationOptions, handleIncomingConfiguration, !skipConsoleConfig);
226 configMember.performConfigurationRetrieve(); 233 configMember.performConfigurationRetrieve();
227 RegionFile = filename; 234 RegionFile = filename;
228 } 235 }
229 236
230 public RegionInfo(string description, XmlNode xmlNode, bool skipConsoleConfig) 237 public RegionInfo(string description, XmlNode xmlNode, bool skipConsoleConfig, IConfigSource configSource)
231 { 238 {
239 m_configSource = configSource;
232 configMember = 240 configMember =
233 new ConfigurationMember(xmlNode, description, loadConfigurationOptions, handleIncomingConfiguration, !skipConsoleConfig); 241 new ConfigurationMember(xmlNode, description, loadConfigurationOptions, handleIncomingConfiguration, !skipConsoleConfig);
234 configMember.performConfigurationRetrieve(); 242 configMember.performConfigurationRetrieve();
@@ -302,6 +310,26 @@ namespace OpenSim.Framework
302 set { m_regionSettings = value; } 310 set { m_regionSettings = value; }
303 } 311 }
304 312
313 public int NonphysPrimMax
314 {
315 get { return m_nonphysPrimMax; }
316 }
317
318 public int PhysPrimMax
319 {
320 get { return m_physPrimMax; }
321 }
322
323 public bool ClampPrimSize
324 {
325 get { return m_clampPrimSize; }
326 }
327
328 public int ObjectCapacity
329 {
330 get { return m_objectCapacity; }
331 }
332
305 public void SetEndPoint(string ipaddr, int port) 333 public void SetEndPoint(string ipaddr, int port)
306 { 334 {
307 IPAddress tmpIP = IPAddress.Parse(ipaddr); 335 IPAddress tmpIP = IPAddress.Parse(ipaddr);
@@ -414,6 +442,17 @@ namespace OpenSim.Framework
414 configMember.addConfigurationOption("lastmap_refresh", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, 442 configMember.addConfigurationOption("lastmap_refresh", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
415 "Last Map Refresh", Util.UnixTimeSinceEpoch().ToString(), true); 443 "Last Map Refresh", Util.UnixTimeSinceEpoch().ToString(), true);
416 444
445 configMember.addConfigurationOption("nonphysical_prim_max", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
446 "Maximum size for nonphysical prims", m_nonphysPrimMax.ToString(), true);
447
448 configMember.addConfigurationOption("physical_prim_max", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
449 "Maximum size for physical prims", m_physPrimMax.ToString(), true);
450
451 configMember.addConfigurationOption("clamp_prim_size", ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN,
452 "Clamp prims to max size", m_clampPrimSize.ToString(), true);
453
454 configMember.addConfigurationOption("object_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
455 "Max objects this sim will hold", m_objectCapacity.ToString(), true);
417 } 456 }
418 457
419 public void loadConfigurationOptions() 458 public void loadConfigurationOptions()
@@ -462,6 +501,18 @@ namespace OpenSim.Framework
462 501
463 configMember.addConfigurationOption("lastmap_refresh", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, 502 configMember.addConfigurationOption("lastmap_refresh", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
464 "Last Map Refresh", Util.UnixTimeSinceEpoch().ToString(), true); 503 "Last Map Refresh", Util.UnixTimeSinceEpoch().ToString(), true);
504
505 configMember.addConfigurationOption("nonphysical_prim_max", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
506 "Maximum size for nonphysical prims", "0", true);
507
508 configMember.addConfigurationOption("physical_prim_max", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
509 "Maximum size for physical prims", "0", true);
510
511 configMember.addConfigurationOption("clamp_prim_size", ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN,
512 "Clamp prims to max size", "false", true);
513
514 configMember.addConfigurationOption("object_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
515 "Max objects this sim will hold", "0", true);
465 } 516 }
466 517
467 public bool shouldMasterAvatarDetailsBeAsked(string configuration_key) 518 public bool shouldMasterAvatarDetailsBeAsked(string configuration_key)
@@ -527,6 +578,18 @@ namespace OpenSim.Framework
527 case "lastmap_refresh": 578 case "lastmap_refresh":
528 lastMapRefresh = (string)configuration_result; 579 lastMapRefresh = (string)configuration_result;
529 break; 580 break;
581 case "nonphysical_prim_max":
582 m_nonphysPrimMax = (int)configuration_result;
583 break;
584 case "physical_prim_max":
585 m_physPrimMax = (int)configuration_result;
586 break;
587 case "clamp_prim_size":
588 m_clampPrimSize = (bool)configuration_result;
589 break;
590 case "object_capacity":
591 m_objectCapacity = (int)configuration_result;
592 break;
530 } 593 }
531 594
532 return true; 595 return true;