From a596b7696a0d880cd322fcad864fc92b85a6a3b7 Mon Sep 17 00:00:00 2001 From: mingchen Date: Thu, 20 Dec 2007 02:36:27 +0000 Subject: *Made a much more network friendly method of ban and pass line sending *Added an event that is triggered when an agent enters a new parcel --- OpenSim/Region/Environment/LandManagement/Land.cs | 24 ++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Environment/LandManagement/Land.cs') diff --git a/OpenSim/Region/Environment/LandManagement/Land.cs b/OpenSim/Region/Environment/LandManagement/Land.cs index 4cfb0c1..da17a69 100644 --- a/OpenSim/Region/Environment/LandManagement/Land.cs +++ b/OpenSim/Region/Environment/LandManagement/Land.cs @@ -227,10 +227,14 @@ namespace OpenSim.Region.Environment.LandManagement } } - public bool isBannedFromLand(ParcelManager.ParcelAccessEntry entry, IClientAPI remote_client) + public bool isBannedFromLand(LLUUID avatar) { if ((this.landData.landFlags & (uint)Parcel.ParcelFlags.UseBanList) > 0) { + ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); + entry.AgentID = avatar; + entry.Flags = ParcelManager.AccessList.Ban; + entry.Time = new DateTime(); if (this.landData.parcelAccessList.Contains(entry)) { //They are banned, so lets send them a notice about this parcel @@ -239,6 +243,24 @@ namespace OpenSim.Region.Environment.LandManagement } return false; } + + public bool isRestrictedFromLand(LLUUID avatar) + { + if ((this.landData.landFlags & (uint)Parcel.ParcelFlags.UseAccessList) > 0) + { + ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); + entry.AgentID = avatar; + entry.Flags = ParcelManager.AccessList.Access; + entry.Time = new DateTime(); + if (!this.landData.parcelAccessList.Contains(entry)) + { + //They are not allowed in this parcel, but not banned, so lets send them a notice about this parcel + return true; + } + } + return false; + } + public void sendLandUpdateToClient(IClientAPI remote_client) { sendLandProperties(0, false, 0, remote_client); -- cgit v1.1