diff options
Diffstat (limited to 'OpenSim/Framework/EstateSettings.cs')
-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 4df7860..3aec437 100644 --- a/OpenSim/Framework/EstateSettings.cs +++ b/OpenSim/Framework/EstateSettings.cs | |||
@@ -363,11 +363,30 @@ namespace OpenSim.Framework | |||
363 | return false; | 363 | return false; |
364 | } | 364 | } |
365 | 365 | ||
366 | public bool IsBanned(UUID avatarID) | 366 | public bool IsBanned(UUID avatarID, int userFlags) |
367 | { | 367 | { |
368 | foreach (EstateBan ban in l_EstateBans) | 368 | foreach (EstateBan ban in l_EstateBans) |
369 | if (ban.BannedUserID == avatarID) | 369 | if (ban.BannedUserID == avatarID) |
370 | return true; | 370 | return true; |
371 | |||
372 | if (!IsEstateManagerOrOwner(avatarID) && !HasAccess(avatarID)) | ||
373 | { | ||
374 | if (DenyMinors) | ||
375 | { | ||
376 | if ((userFlags & 32) == 0) | ||
377 | { | ||
378 | return true; | ||
379 | } | ||
380 | } | ||
381 | if (DenyAnonymous) | ||
382 | { | ||
383 | if ((userFlags & 4) == 0) | ||
384 | { | ||
385 | return true; | ||
386 | } | ||
387 | } | ||
388 | } | ||
389 | |||
371 | return false; | 390 | return false; |
372 | } | 391 | } |
373 | 392 | ||
@@ -375,7 +394,7 @@ namespace OpenSim.Framework | |||
375 | { | 394 | { |
376 | if (ban == null) | 395 | if (ban == null) |
377 | return; | 396 | return; |
378 | if (!IsBanned(ban.BannedUserID)) | 397 | if (!IsBanned(ban.BannedUserID, 32)) //Ignore age-based bans |
379 | l_EstateBans.Add(ban); | 398 | l_EstateBans.Add(ban); |
380 | } | 399 | } |
381 | 400 | ||