aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/EstateSettings.cs
diff options
context:
space:
mode:
authorTom2011-01-26 14:20:39 -0800
committerTom2011-01-26 14:20:39 -0800
commit3ecf712e4dd5318442e7c853eb43299840594ce5 (patch)
tree9ba1930ba8f11daddb85e26155b61435e95c4ab8 /OpenSim/Framework/EstateSettings.cs
parentRevert my previous SHA1 commit in favour of a better implementation (diff)
downloadopensim-SC_OLD-3ecf712e4dd5318442e7c853eb43299840594ce5.zip
opensim-SC_OLD-3ecf712e4dd5318442e7c853eb43299840594ce5.tar.gz
opensim-SC_OLD-3ecf712e4dd5318442e7c853eb43299840594ce5.tar.bz2
opensim-SC_OLD-3ecf712e4dd5318442e7c853eb43299840594ce5.tar.xz
Add userFlags check to isBanned. This checks bans against DenyAnonymous and DenyMinors. Note that the ban doesn't actually work yet due to some stuff mel's working on .
Diffstat (limited to '')
-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