aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs21
-rw-r--r--bin/Regions/Regions.ini.example6
2 files changed, 10 insertions, 17 deletions
diff --git a/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs b/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs
index 2b421e5..395bbf1 100644
--- a/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs
+++ b/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs
@@ -175,15 +175,9 @@ namespace OpenSim.Region.OptionalModules
175 private string DoCommonChecks(int objectCount, UUID ownerID, ILandObject lo, Scene scene) 175 private string DoCommonChecks(int objectCount, UUID ownerID, ILandObject lo, Scene scene)
176 { 176 {
177 string response = null; 177 string response = null;
178 EstateSettings estateSettings = scene.RegionInfo.EstateSettings;
179 178
180 // counts don't seem to be updated, so force it.
181 scene.EventManager.TriggerParcelPrimCountUpdate();
182
183 int usedPrims = lo.PrimCounts.Total;
184 int simulatorCapacity = lo.GetSimulatorMaxPrimCount(); 179 int simulatorCapacity = lo.GetSimulatorMaxPrimCount();
185 180 if ((objectCount + lo.PrimCounts.Total) > simulatorCapacity)
186 if ((objectCount + usedPrims) > simulatorCapacity)
187 { 181 {
188 response = "Unable to rez object because the parcel is too full"; 182 response = "Unable to rez object because the parcel is too full";
189 } 183 }
@@ -195,21 +189,16 @@ namespace OpenSim.Region.OptionalModules
195 // per-user prim limit is set 189 // per-user prim limit is set
196 if (ownerID != lo.LandData.OwnerID || lo.LandData.IsGroupOwned) 190 if (ownerID != lo.LandData.OwnerID || lo.LandData.IsGroupOwned)
197 { 191 {
198 // caller is not the sole parcel owner 192 // caller is not the sole Parcel owner
193 EstateSettings estateSettings = scene.RegionInfo.EstateSettings;
199 if (ownerID != estateSettings.EstateOwner) 194 if (ownerID != estateSettings.EstateOwner)
200 { 195 {
201 // caller is NOT the Estate owner 196 // caller is NOT the Estate owner
202 List<UUID> mgrs = new List<UUID>(estateSettings.EstateManagers); 197 List<UUID> mgrs = new List<UUID>(estateSettings.EstateManagers);
203 if (!mgrs.Contains(ownerID)) 198 if (!mgrs.Contains(ownerID))
204 { 199 {
205 // caller is NOT an Estate Manager, so check quota 200 // caller is not an Estate Manager
206 Dictionary<UUID, int> objectMap = lo.GetLandObjectOwners(); 201 if ((lo.PrimCounts.Users[ownerID] + objectCount) > maxPrimsPerUser)
207 int currentCount;
208 if (!objectMap.TryGetValue(ownerID, out currentCount))
209 {
210 currentCount = 0;
211 }
212 if ((currentCount + objectCount) > maxPrimsPerUser)
213 { 202 {
214 response = "Unable to rez object because you have reached your limit"; 203 response = "Unable to rez object because you have reached your limit";
215 } 204 }
diff --git a/bin/Regions/Regions.ini.example b/bin/Regions/Regions.ini.example
index 36ccd8c..253e897 100644
--- a/bin/Regions/Regions.ini.example
+++ b/bin/Regions/Regions.ini.example
@@ -34,6 +34,10 @@ ExternalHostName = "SYSTEMIP"
34; MaxPrims = 15000 34; MaxPrims = 15000
35; MaxAgents = 100 35; MaxAgents = 100
36 36
37; * Max prims per user (per parcel).
38; * Negative values will disable the check.
39; MaxPrimsPerUser = -1
40
37; * 41; *
38; * Multi-Tenancy. Only set if needed 42; * Multi-Tenancy. Only set if needed
39; * 43; *
@@ -83,4 +87,4 @@ ExternalHostName = "SYSTEMIP"
83; * built using MapImageModule's terrain and prim renderer. Parcel 'for sale' overlays are 87; * built using MapImageModule's terrain and prim renderer. Parcel 'for sale' overlays are
84; * still drawn on top of the static map by the World Map module. 88; * still drawn on top of the static map by the World Map module.
85 89
86; MaptileStaticFile = "SomeFile.png" \ No newline at end of file 90; MaptileStaticFile = "SomeFile.png"