aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
diff options
context:
space:
mode:
authorMelanie2012-02-05 04:03:32 +0000
committerMelanie2012-02-05 04:03:32 +0000
commit8923ad755d97d5ddb4a29cb6f543b53195f0b461 (patch)
tree432571b04ff2a9944a8b4db4f1fdaa97176afb2f /OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
parentRemove checks on ban list expiry on every move. To be re-added on parcel (diff)
downloadopensim-SC_OLD-8923ad755d97d5ddb4a29cb6f543b53195f0b461.zip
opensim-SC_OLD-8923ad755d97d5ddb4a29cb6f543b53195f0b461.tar.gz
opensim-SC_OLD-8923ad755d97d5ddb4a29cb6f543b53195f0b461.tar.bz2
opensim-SC_OLD-8923ad755d97d5ddb4a29cb6f543b53195f0b461.tar.xz
Check ban list for a particular parcel only when an avatar moves into it.
This restores functionality remove in the last commit without reintroducing the performance penalty.
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs')
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs17
1 files changed, 17 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
index 1c503aa..00ac44d 100644
--- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
+++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
@@ -389,6 +389,8 @@ namespace OpenSim.Region.CoreModules.World.Land
389 { 389 {
390 if (avatar.AbsolutePosition.Z < LandChannel.BAN_LINE_SAFETY_HIEGHT) 390 if (avatar.AbsolutePosition.Z < LandChannel.BAN_LINE_SAFETY_HIEGHT)
391 { 391 {
392 ExpireAccessList(parcelAvatarIsEntering);
393
392 if (parcelAvatarIsEntering.IsBannedFromLand(avatar.UUID)) 394 if (parcelAvatarIsEntering.IsBannedFromLand(avatar.UUID))
393 { 395 {
394 SendYouAreBannedNotice(avatar); 396 SendYouAreBannedNotice(avatar);
@@ -1711,5 +1713,20 @@ namespace OpenSim.Region.CoreModules.World.Land
1711 1713
1712 MainConsole.Instance.Output(report.ToString()); 1714 MainConsole.Instance.Output(report.ToString());
1713 } 1715 }
1716
1717 private void ExpireAccessList(ILandObject land)
1718 {
1719 List<LandAccessEntry> delete = new List<LandAccessEntry>();
1720
1721 foreach (LandAccessEntry entry in land.LandData.ParcelAccessList)
1722 {
1723 if (entry.Expires != 0 && entry.Expires < Util.UnixTimeSinceEpoch())
1724 delete.Add(entry);
1725 }
1726 foreach (LandAccessEntry entry in delete)
1727 land.LandData.ParcelAccessList.Remove(entry);
1728
1729 m_scene.EventManager.TriggerLandObjectUpdated((uint)land.LandData.LocalID, land);
1730 }
1714 } 1731 }
1715} 1732}