diff options
author | Melanie | 2011-01-28 03:07:25 +0100 |
---|---|---|
committer | Melanie | 2011-01-28 03:07:25 +0100 |
commit | 657c14c5db8b0c882484926ba76aa64ec757ee07 (patch) | |
tree | 595a97b1a82144acade004772d65e018ca93426c /OpenSim/Region/Framework/Scenes/Scene.cs | |
parent | Comment a very spammy debug message that was being output directly to console. (diff) | |
download | opensim-SC-657c14c5db8b0c882484926ba76aa64ec757ee07.zip opensim-SC-657c14c5db8b0c882484926ba76aa64ec757ee07.tar.gz opensim-SC-657c14c5db8b0c882484926ba76aa64ec757ee07.tar.bz2 opensim-SC-657c14c5db8b0c882484926ba76aa64ec757ee07.tar.xz |
Fix up QueryAccess to also check parcels
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 29 |
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 | } |