diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/EstateSettings.cs | 36 |
1 files changed, 34 insertions, 2 deletions
diff --git a/OpenSim/Framework/EstateSettings.cs b/OpenSim/Framework/EstateSettings.cs index 4df7860..4c9f6e9 100644 --- a/OpenSim/Framework/EstateSettings.cs +++ b/OpenSim/Framework/EstateSettings.cs | |||
@@ -365,9 +365,41 @@ namespace OpenSim.Framework | |||
365 | 365 | ||
366 | public bool IsBanned(UUID avatarID) | 366 | public bool IsBanned(UUID avatarID) |
367 | { | 367 | { |
368 | foreach (EstateBan ban in l_EstateBans) | 368 | if (!IsEstateManagerOrOwner(avatarID)) |
369 | { | ||
370 | foreach (EstateBan ban in l_EstateBans) | ||
371 | if (ban.BannedUserID == avatarID) | ||
372 | return true; | ||
373 | } | ||
374 | return false; | ||
375 | } | ||
376 | |||
377 | public bool IsBanned(UUID avatarID, int userFlags) | ||
378 | { | ||
379 | if (!IsEstateManagerOrOwner(avatarID)) | ||
380 | { | ||
381 | foreach (EstateBan ban in l_EstateBans) | ||
369 | if (ban.BannedUserID == avatarID) | 382 | if (ban.BannedUserID == avatarID) |
370 | return true; | 383 | return true; |
384 | |||
385 | if (!HasAccess(avatarID)) | ||
386 | { | ||
387 | if (DenyMinors) | ||
388 | { | ||
389 | if ((userFlags & 32) == 0) | ||
390 | { | ||
391 | return true; | ||
392 | } | ||
393 | } | ||
394 | if (DenyAnonymous) | ||
395 | { | ||
396 | if ((userFlags & 4) == 0) | ||
397 | { | ||
398 | return true; | ||
399 | } | ||
400 | } | ||
401 | } | ||
402 | } | ||
371 | return false; | 403 | return false; |
372 | } | 404 | } |
373 | 405 | ||
@@ -375,7 +407,7 @@ namespace OpenSim.Framework | |||
375 | { | 407 | { |
376 | if (ban == null) | 408 | if (ban == null) |
377 | return; | 409 | return; |
378 | if (!IsBanned(ban.BannedUserID)) | 410 | if (!IsBanned(ban.BannedUserID, 32)) //Ignore age-based bans |
379 | l_EstateBans.Add(ban); | 411 | l_EstateBans.Add(ban); |
380 | } | 412 | } |
381 | 413 | ||