diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/EstateSettings.cs | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/OpenSim/Framework/EstateSettings.cs b/OpenSim/Framework/EstateSettings.cs index a02993d..5ddbd61 100644 --- a/OpenSim/Framework/EstateSettings.cs +++ b/OpenSim/Framework/EstateSettings.cs | |||
@@ -362,11 +362,30 @@ namespace OpenSim.Framework | |||
362 | return false; | 362 | return false; |
363 | } | 363 | } |
364 | 364 | ||
365 | public bool IsBanned(UUID avatarID) | 365 | public bool IsBanned(UUID avatarID, int userFlags) |
366 | { | 366 | { |
367 | foreach (EstateBan ban in l_EstateBans) | 367 | foreach (EstateBan ban in l_EstateBans) |
368 | if (ban.BannedUserID == avatarID) | 368 | if (ban.BannedUserID == avatarID) |
369 | return true; | 369 | return true; |
370 | |||
371 | if (!IsEstateManagerOrOwner(avatarID) && !HasAccess(avatarID)) | ||
372 | { | ||
373 | if (DenyMinors) | ||
374 | { | ||
375 | if ((userFlags & 32) == 0) | ||
376 | { | ||
377 | return true; | ||
378 | } | ||
379 | } | ||
380 | if (DenyAnonymous) | ||
381 | { | ||
382 | if ((userFlags & 4) == 0) | ||
383 | { | ||
384 | return true; | ||
385 | } | ||
386 | } | ||
387 | } | ||
388 | |||
370 | return false; | 389 | return false; |
371 | } | 390 | } |
372 | 391 | ||
@@ -374,7 +393,7 @@ namespace OpenSim.Framework | |||
374 | { | 393 | { |
375 | if (ban == null) | 394 | if (ban == null) |
376 | return; | 395 | return; |
377 | if (!IsBanned(ban.BannedUserID)) | 396 | if (!IsBanned(ban.BannedUserID, 32)) //Ignore age-based bans |
378 | l_EstateBans.Add(ban); | 397 | l_EstateBans.Add(ban); |
379 | } | 398 | } |
380 | 399 | ||