aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/World/Land
diff options
context:
space:
mode:
authorMelanie2012-06-07 00:24:33 +0200
committerMelanie2012-06-07 00:24:33 +0200
commita94510500357848f2dee26e599abad5256d2f5eb (patch)
tree51e071db0b31c73b543615d629171d31ac4fbef3 /OpenSim/Region/CoreModules/World/Land
parentPrevent a null ref when getting the velocity of an avatar during login or (diff)
downloadopensim-SC_OLD-a94510500357848f2dee26e599abad5256d2f5eb.zip
opensim-SC_OLD-a94510500357848f2dee26e599abad5256d2f5eb.tar.gz
opensim-SC_OLD-a94510500357848f2dee26e599abad5256d2f5eb.tar.bz2
opensim-SC_OLD-a94510500357848f2dee26e599abad5256d2f5eb.tar.xz
Make timed bans / timed passes work as expected. Prevent transmission of media
URLs to banned clients.
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Land')
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs7
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandObject.cs29
2 files changed, 34 insertions, 2 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
index 02ac091..add1551 100644
--- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
+++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
@@ -1101,8 +1101,11 @@ namespace OpenSim.Region.CoreModules.World.Land
1101 { 1101 {
1102 if (!temp.Contains(currentParcel)) 1102 if (!temp.Contains(currentParcel))
1103 { 1103 {
1104 currentParcel.ForceUpdateLandInfo(); 1104 if (!currentParcel.IsEitherBannedOrRestricted(remote_client.AgentId))
1105 temp.Add(currentParcel); 1105 {
1106 currentParcel.ForceUpdateLandInfo();
1107 temp.Add(currentParcel);
1108 }
1106 } 1109 }
1107 } 1110 }
1108 } 1111 }
diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs
index 509c4d7..4284444 100644
--- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs
+++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs
@@ -50,6 +50,7 @@ namespace OpenSim.Region.CoreModules.World.Land
50 private bool[,] m_landBitmap = new bool[landArrayMax,landArrayMax]; 50 private bool[,] m_landBitmap = new bool[landArrayMax,landArrayMax];
51 51
52 private int m_lastSeqId = 0; 52 private int m_lastSeqId = 0;
53 private int m_expiryCounter = 0;
53 54
54 protected LandData m_landData = new LandData(); 55 protected LandData m_landData = new LandData();
55 protected Scene m_scene; 56 protected Scene m_scene;
@@ -135,6 +136,8 @@ namespace OpenSim.Region.CoreModules.World.Land
135 else 136 else
136 LandData.GroupID = UUID.Zero; 137 LandData.GroupID = UUID.Zero;
137 LandData.IsGroupOwned = is_group_owned; 138 LandData.IsGroupOwned = is_group_owned;
139
140 m_scene.EventManager.OnFrame += OnFrame;
138 } 141 }
139 142
140 #endregion 143 #endregion
@@ -1196,6 +1199,17 @@ namespace OpenSim.Region.CoreModules.World.Land
1196 1199
1197 #endregion 1200 #endregion
1198 1201
1202 private void OnFrame()
1203 {
1204 m_expiryCounter++;
1205
1206 if (m_expiryCounter >= 50)
1207 {
1208 ExpireAccessList();
1209 m_expiryCounter = 0;
1210 }
1211 }
1212
1199 private void ExpireAccessList() 1213 private void ExpireAccessList()
1200 { 1214 {
1201 List<LandAccessEntry> delete = new List<LandAccessEntry>(); 1215 List<LandAccessEntry> delete = new List<LandAccessEntry>();
@@ -1206,7 +1220,22 @@ namespace OpenSim.Region.CoreModules.World.Land
1206 delete.Add(entry); 1220 delete.Add(entry);
1207 } 1221 }
1208 foreach (LandAccessEntry entry in delete) 1222 foreach (LandAccessEntry entry in delete)
1223 {
1209 LandData.ParcelAccessList.Remove(entry); 1224 LandData.ParcelAccessList.Remove(entry);
1225 ScenePresence presence;
1226
1227 if (m_scene.TryGetScenePresence(entry.AgentID, out presence) && (!presence.IsChildAgent))
1228 {
1229 ILandObject land = m_scene.LandChannel.GetLandObject(presence.AbsolutePosition.X, presence.AbsolutePosition.Y);
1230 if (land.LandData.LocalID == LandData.LocalID)
1231 {
1232 Vector3 pos = m_scene.GetNearestAllowedPosition(presence, land);
1233 presence.TeleportWithMomentum(pos);
1234 presence.ControllingClient.SendAlertMessage("You have been ejected from this land");
1235 }
1236 }
1237 m_log.DebugFormat("[LAND]: Removing entry {0} because it has expired", entry.AgentID);
1238 }
1210 1239
1211 if (delete.Count > 0) 1240 if (delete.Count > 0)
1212 m_scene.EventManager.TriggerLandObjectUpdated((uint)LandData.LocalID, this); 1241 m_scene.EventManager.TriggerLandObjectUpdated((uint)LandData.LocalID, this);