From f0998a9222bdbd27bc11ed106cb4087c18b2c05e Mon Sep 17 00:00:00 2001 From: Dev Random Date: Thu, 10 Apr 2014 21:08:54 -0400 Subject: Add per-user checking to PrimLimitsModule Signed-off-by: Melanie --- OpenSim/Framework/RegionInfo.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'OpenSim/Framework/RegionInfo.cs') diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs index 2390118..44d05b7 100644 --- a/OpenSim/Framework/RegionInfo.cs +++ b/OpenSim/Framework/RegionInfo.cs @@ -127,6 +127,7 @@ namespace OpenSim.Framework private int m_physPrimMax = 0; private bool m_clampPrimSize = false; private int m_objectCapacity = 0; + private int m_maxPrimsPerUser = -1; private int m_linksetCapacity = 0; private int m_agentCapacity = 0; private string m_regionType = String.Empty; @@ -325,6 +326,11 @@ namespace OpenSim.Framework get { return m_objectCapacity; } } + public int MaxPrimsPerUser + { + get { return m_maxPrimsPerUser; } + } + public int LinksetCapacity { get { return m_linksetCapacity; } @@ -709,6 +715,9 @@ namespace OpenSim.Framework m_objectCapacity = config.GetInt("MaxPrims", 15000); allKeys.Remove("MaxPrims"); + m_maxPrimsPerUser = config.GetInt("MaxPrimsPerUser", -1); + allKeys.Remove("MaxPrimsPerUser"); + m_linksetCapacity = config.GetInt("LinksetPrims", 0); allKeys.Remove("LinksetPrims"); @@ -834,6 +843,9 @@ namespace OpenSim.Framework if (m_objectCapacity > 0) config.Set("MaxPrims", m_objectCapacity); + if (m_maxPrimsPerUser > -1) + config.Set("MaxPrimsPerUser", m_maxPrimsPerUser); + if (m_linksetCapacity > 0) config.Set("LinksetPrims", m_linksetCapacity); @@ -946,6 +958,9 @@ namespace OpenSim.Framework configMember.addConfigurationOption("object_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32, "Max objects this sim will hold", m_objectCapacity.ToString(), true); + configMember.addConfigurationOption("prims_per_user", ConfigurationOption.ConfigurationTypes.TYPE_INT32, + "Max objects one user may rez", m_maxPrimsPerUser.ToString(), true); + configMember.addConfigurationOption("linkset_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32, "Max prims an object will hold", m_linksetCapacity.ToString(), true); @@ -1096,6 +1111,9 @@ namespace OpenSim.Framework case "object_capacity": m_objectCapacity = (int)configuration_result; break; + case "prims_per_user": + m_maxPrimsPerUser = (int)configuration_result; + break; case "linkset_capacity": m_linksetCapacity = (int)configuration_result; break; -- cgit v1.1