aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/EstateSettings.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/EstateSettings.cs')
-rw-r--r--OpenSim/Framework/EstateSettings.cs23
1 files changed, 21 insertions, 2 deletions
diff --git a/OpenSim/Framework/EstateSettings.cs b/OpenSim/Framework/EstateSettings.cs
index 2a495b0..f9c13f3 100644
--- a/OpenSim/Framework/EstateSettings.cs
+++ b/OpenSim/Framework/EstateSettings.cs
@@ -338,11 +338,30 @@ namespace OpenSim.Framework
338 return false; 338 return false;
339 } 339 }
340 340
341 public bool IsBanned(UUID avatarID) 341 public bool IsBanned(UUID avatarID, int userFlags)
342 { 342 {
343 foreach (EstateBan ban in l_EstateBans) 343 foreach (EstateBan ban in l_EstateBans)
344 if (ban.BannedUserID == avatarID) 344 if (ban.BannedUserID == avatarID)
345 return true; 345 return true;
346
347 if (!IsEstateManager(avatarID) && !HasAccess(avatarID))
348 {
349 if (DenyMinors)
350 {
351 if ((userFlags & 32) == 0)
352 {
353 return true;
354 }
355 }
356 if (DenyAnonymous)
357 {
358 if ((userFlags & 4) == 0)
359 {
360 return true;
361 }
362 }
363 }
364
346 return false; 365 return false;
347 } 366 }
348 367
@@ -350,7 +369,7 @@ namespace OpenSim.Framework
350 { 369 {
351 if (ban == null) 370 if (ban == null)
352 return; 371 return;
353 if (!IsBanned(ban.BannedUserID)) 372 if (!IsBanned(ban.BannedUserID, 32)) //Ignore age-based bans
354 l_EstateBans.Add(ban); 373 l_EstateBans.Add(ban);
355 } 374 }
356 375