aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs')
-rw-r--r--OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs7
1 files changed, 7 insertions, 0 deletions
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
index 6f8ec43..1490893 100644
--- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
+++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
@@ -378,6 +378,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
378 XmlRpcResponse response = new XmlRpcResponse(); 378 XmlRpcResponse response = new XmlRpcResponse();
379 Hashtable responseData = new Hashtable(); 379 Hashtable responseData = new Hashtable();
380 380
381 int m_regionLimit = m_config.GetInt("region_limit", 0);
382
381 try { 383 try {
382 Hashtable requestData = (Hashtable) request.Params[0]; 384 Hashtable requestData = (Hashtable) request.Params[0];
383 385
@@ -392,6 +394,11 @@ namespace OpenSim.ApplicationPlugins.RemoteController
392 if (!String.IsNullOrEmpty(requiredPassword) && 394 if (!String.IsNullOrEmpty(requiredPassword) &&
393 (string)requestData["password"] != requiredPassword) throw new Exception("wrong password"); 395 (string)requestData["password"] != requiredPassword) throw new Exception("wrong password");
394 396
397 // check whether we still have space left (iff we are using limits)
398 if (m_regionLimit != 0 && m_app.SceneManager.Scenes.Count >= m_regionLimit)
399 throw new Exception(String.Format("cannot instantiate new region, server capacity {0} already reached; delete regions first", m_regionLimit));
400
401
395 // extract or generate region ID now 402 // extract or generate region ID now
396 Scene scene = null; 403 Scene scene = null;
397 UUID regionID = UUID.Zero; 404 UUID regionID = UUID.Zero;