aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs29
1 files changed, 22 insertions, 7 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 5caf06c..c65a82b 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -5141,23 +5141,38 @@ namespace OpenSim.Region.Framework.Scenes
5141 // from logging into the region, teleporting into the region 5141 // from logging into the region, teleporting into the region
5142 // or corssing the broder walking, but will NOT prevent 5142 // or corssing the broder walking, but will NOT prevent
5143 // child agent creation, thereby emulating the SL behavior. 5143 // child agent creation, thereby emulating the SL behavior.
5144 public bool QueryAccess(UUID agentID) 5144 public bool QueryAccess(UUID agentID, Vector3 position)
5145 { 5145 {
5146 string reason; 5146 string reason;
5147 5147
5148 if (!AuthorizeUser(agentID, out reason)) 5148 if (!AuthorizeUser(agentID, out reason))
5149 { 5149 {
5150 m_log.DebugFormat("[SCENE]: Denying access for {0}", agentID); 5150 // m_log.DebugFormat("[SCENE]: Denying access for {0}", agentID);
5151 return false; 5151 return false;
5152 } 5152 }
5153 5153
5154 float posX = 128.0f; 5154 if (position == Vector3.Zero) // Teleport
5155 float posY = 128.0f; 5155 {
5156 float posX = 128.0f;
5157 float posY = 128.0f;
5156 5158
5157 if (!TestLandRestrictions(agentID, out reason, ref posX, ref posY)) 5159 if (!TestLandRestrictions(agentID, out reason, ref posX, ref posY))
5160 {
5161 // m_log.DebugFormat("[SCENE]: Denying {0} because they are banned on all parcels", agentID);
5162 return false;
5163 }
5164 }
5165 else // Walking
5158 { 5166 {
5159 m_log.DebugFormat("[SCENE]: Denying {0} because they are banned on all parcels", agentID); 5167 ILandObject land = LandChannel.GetLandObject(position.X, position.Y);
5160 return false; 5168 if (land == null)
5169 return false;
5170
5171 bool banned = land.IsBannedFromLand(agentID);
5172 bool restricted = land.IsRestrictedFromLand(agentID);
5173
5174 if (banned || restricted)
5175 return false;
5161 } 5176 }
5162 return true; 5177 return true;
5163 } 5178 }