mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 08:55:56 +08:00
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.
This commit is contained in:
@@ -389,6 +389,8 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||
{
|
||||
if (avatar.AbsolutePosition.Z < LandChannel.BAN_LINE_SAFETY_HIEGHT)
|
||||
{
|
||||
ExpireAccessList(parcelAvatarIsEntering);
|
||||
|
||||
if (parcelAvatarIsEntering.IsBannedFromLand(avatar.UUID))
|
||||
{
|
||||
SendYouAreBannedNotice(avatar);
|
||||
@@ -1711,5 +1713,20 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||
|
||||
MainConsole.Instance.Output(report.ToString());
|
||||
}
|
||||
|
||||
private void ExpireAccessList(ILandObject land)
|
||||
{
|
||||
List<LandAccessEntry> delete = new List<LandAccessEntry>();
|
||||
|
||||
foreach (LandAccessEntry entry in land.LandData.ParcelAccessList)
|
||||
{
|
||||
if (entry.Expires != 0 && entry.Expires < Util.UnixTimeSinceEpoch())
|
||||
delete.Add(entry);
|
||||
}
|
||||
foreach (LandAccessEntry entry in delete)
|
||||
land.LandData.ParcelAccessList.Remove(entry);
|
||||
|
||||
m_scene.EventManager.TriggerLandObjectUpdated((uint)land.LandData.LocalID, land);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -418,8 +418,6 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||
|
||||
public bool IsBannedFromLand(UUID avatar)
|
||||
{
|
||||
// ExpireAccessList();
|
||||
//
|
||||
if (m_scene.Permissions.IsAdministrator(avatar))
|
||||
return false;
|
||||
|
||||
@@ -447,8 +445,6 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||
|
||||
public bool IsRestrictedFromLand(UUID avatar)
|
||||
{
|
||||
// ExpireAccessList();
|
||||
//
|
||||
if (m_scene.Permissions.IsAdministrator(avatar))
|
||||
return false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user