aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/EstateSettings.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/EstateSettings.cs32
1 files changed, 28 insertions, 4 deletions
diff --git a/OpenSim/Framework/EstateSettings.cs b/OpenSim/Framework/EstateSettings.cs
index 4c9f6e9..844230b 100644
--- a/OpenSim/Framework/EstateSettings.cs
+++ b/OpenSim/Framework/EstateSettings.cs
@@ -305,11 +305,17 @@ namespace OpenSim.Framework
305 OnSave(this); 305 OnSave(this);
306 } 306 }
307 307
308 public int EstateUsersCount()
309 {
310 return l_EstateAccess.Count;
311 }
312
308 public void AddEstateUser(UUID avatarID) 313 public void AddEstateUser(UUID avatarID)
309 { 314 {
310 if (avatarID == UUID.Zero) 315 if (avatarID == UUID.Zero)
311 return; 316 return;
312 if (!l_EstateAccess.Contains(avatarID)) 317 if (!l_EstateAccess.Contains(avatarID) &&
318 (l_EstateAccess.Count < (int)Constants.EstateAccessLimits.AllowedAccess))
313 l_EstateAccess.Add(avatarID); 319 l_EstateAccess.Add(avatarID);
314 } 320 }
315 321
@@ -319,11 +325,17 @@ namespace OpenSim.Framework
319 l_EstateAccess.Remove(avatarID); 325 l_EstateAccess.Remove(avatarID);
320 } 326 }
321 327
328 public int EstateGroupsCount()
329 {
330 return l_EstateGroups.Count;
331 }
332
322 public void AddEstateGroup(UUID avatarID) 333 public void AddEstateGroup(UUID avatarID)
323 { 334 {
324 if (avatarID == UUID.Zero) 335 if (avatarID == UUID.Zero)
325 return; 336 return;
326 if (!l_EstateGroups.Contains(avatarID)) 337 if (!l_EstateGroups.Contains(avatarID) &&
338 (l_EstateGroups.Count < (int)Constants.EstateAccessLimits.AllowedGroups))
327 l_EstateGroups.Add(avatarID); 339 l_EstateGroups.Add(avatarID);
328 } 340 }
329 341
@@ -333,11 +345,17 @@ namespace OpenSim.Framework
333 l_EstateGroups.Remove(avatarID); 345 l_EstateGroups.Remove(avatarID);
334 } 346 }
335 347
348 public int EstateManagersCount()
349 {
350 return l_EstateManagers.Count;
351 }
352
336 public void AddEstateManager(UUID avatarID) 353 public void AddEstateManager(UUID avatarID)
337 { 354 {
338 if (avatarID == UUID.Zero) 355 if (avatarID == UUID.Zero)
339 return; 356 return;
340 if (!l_EstateManagers.Contains(avatarID)) 357 if (!l_EstateManagers.Contains(avatarID) &&
358 (l_EstateManagers.Count < (int)Constants.EstateAccessLimits.EstateManagers))
341 l_EstateManagers.Add(avatarID); 359 l_EstateManagers.Add(avatarID);
342 } 360 }
343 361
@@ -403,11 +421,17 @@ namespace OpenSim.Framework
403 return false; 421 return false;
404 } 422 }
405 423
424 public int EstateBansCount()
425 {
426 return l_EstateBans.Count;
427 }
428
406 public void AddBan(EstateBan ban) 429 public void AddBan(EstateBan ban)
407 { 430 {
408 if (ban == null) 431 if (ban == null)
409 return; 432 return;
410 if (!IsBanned(ban.BannedUserID, 32)) //Ignore age-based bans 433 if (!IsBanned(ban.BannedUserID, 32) &&
434 (l_EstateBans.Count < (int)Constants.EstateAccessLimits.EstateBans)) //Ignore age-based bans
411 l_EstateBans.Add(ban); 435 l_EstateBans.Add(ban);
412 } 436 }
413 437