aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/LandManagement/Land.cs
diff options
context:
space:
mode:
authormingchen2007-12-20 02:36:27 +0000
committermingchen2007-12-20 02:36:27 +0000
commita596b7696a0d880cd322fcad864fc92b85a6a3b7 (patch)
tree4f8d26fcbf2f73b1560a5584d59c2703b2026664 /OpenSim/Region/Environment/LandManagement/Land.cs
parentAdded null check back into ModuleLoader.cs (diff)
downloadopensim-SC_OLD-a596b7696a0d880cd322fcad864fc92b85a6a3b7.zip
opensim-SC_OLD-a596b7696a0d880cd322fcad864fc92b85a6a3b7.tar.gz
opensim-SC_OLD-a596b7696a0d880cd322fcad864fc92b85a6a3b7.tar.bz2
opensim-SC_OLD-a596b7696a0d880cd322fcad864fc92b85a6a3b7.tar.xz
*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
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/LandManagement/Land.cs24
1 files changed, 23 insertions, 1 deletions
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
227 } 227 }
228 } 228 }
229 229
230 public bool isBannedFromLand(ParcelManager.ParcelAccessEntry entry, IClientAPI remote_client) 230 public bool isBannedFromLand(LLUUID avatar)
231 { 231 {
232 if ((this.landData.landFlags & (uint)Parcel.ParcelFlags.UseBanList) > 0) 232 if ((this.landData.landFlags & (uint)Parcel.ParcelFlags.UseBanList) > 0)
233 { 233 {
234 ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
235 entry.AgentID = avatar;
236 entry.Flags = ParcelManager.AccessList.Ban;
237 entry.Time = new DateTime();
234 if (this.landData.parcelAccessList.Contains(entry)) 238 if (this.landData.parcelAccessList.Contains(entry))
235 { 239 {
236 //They are banned, so lets send them a notice about this parcel 240 //They are banned, so lets send them a notice about this parcel
@@ -239,6 +243,24 @@ namespace OpenSim.Region.Environment.LandManagement
239 } 243 }
240 return false; 244 return false;
241 } 245 }
246
247 public bool isRestrictedFromLand(LLUUID avatar)
248 {
249 if ((this.landData.landFlags & (uint)Parcel.ParcelFlags.UseAccessList) > 0)
250 {
251 ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
252 entry.AgentID = avatar;
253 entry.Flags = ParcelManager.AccessList.Access;
254 entry.Time = new DateTime();
255 if (!this.landData.parcelAccessList.Contains(entry))
256 {
257 //They are not allowed in this parcel, but not banned, so lets send them a notice about this parcel
258 return true;
259 }
260 }
261 return false;
262 }
263
242 public void sendLandUpdateToClient(IClientAPI remote_client) 264 public void sendLandUpdateToClient(IClientAPI remote_client)
243 { 265 {
244 sendLandProperties(0, false, 0, remote_client); 266 sendLandProperties(0, false, 0, remote_client);