aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs9
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs9
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs6
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs2
4 files changed, 15 insertions, 11 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index 7804b7f..54b95f7 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -284,6 +284,12 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
284 return; 284 return;
285 } 285 }
286 286
287 if (!m_aScene.SimulationService.QueryAccess(finalDestination, sp.ControllingClient.AgentId, Vector3.Zero))
288 {
289 sp.ControllingClient.SendTeleportFailed("The destination region has refused access");
290 return;
291 }
292
287 sp.ControllingClient.SendTeleportStart(teleportFlags); 293 sp.ControllingClient.SendTeleportStart(teleportFlags);
288 294
289 // the avatar.Close below will clear the child region list. We need this below for (possibly) 295 // the avatar.Close below will clear the child region list. We need this below for (possibly)
@@ -772,8 +778,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
772 778
773 GridRegion neighbourRegion = scene.GridService.GetRegionByPosition(scene.RegionInfo.ScopeID, (int)x, (int)y); 779 GridRegion neighbourRegion = scene.GridService.GetRegionByPosition(scene.RegionInfo.ScopeID, (int)x, (int)y);
774 780
775 if (!scene.SimulationService.QueryAccess(neighbourRegion, agent.ControllingClient.AgentId)) 781 if (!scene.SimulationService.QueryAccess(neighbourRegion, agent.ControllingClient.AgentId, newpos))
776 { 782 {
783 agent.ControllingClient.SendAlertMessage("Cannot region cross into banned parcel");
777 if (r == null) 784 if (r == null)
778 { 785 {
779 r = new ExpiringCache<ulong, DateTime>(); 786 r = new ExpiringCache<ulong, DateTime>();
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
index 2dd0099..c5972dd 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
@@ -257,18 +257,15 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
257 return false; 257 return false;
258 } 258 }
259 259
260 public bool QueryAccess(GridRegion destination, UUID id) 260 public bool QueryAccess(GridRegion destination, UUID id, Vector3 position)
261 { 261 {
262 if (destination == null) 262 if (destination == null)
263 return false; 263 return false;
264 264
265 foreach (Scene s in m_sceneList) 265 foreach (Scene s in m_sceneList)
266 { 266 {
267 if (s.RegionInfo.RegionHandle == destination.RegionHandle) 267 if (s.RegionInfo.RegionID == destination.RegionID)
268 { 268 return s.QueryAccess(id, position);
269 //m_log.Debug("[LOCAL COMMS]: Found region to send QueryAccess");
270 return s.QueryAccess(id);
271 }
272 } 269 }
273 //m_log.Debug("[LOCAL COMMS]: region not found for QueryAccess"); 270 //m_log.Debug("[LOCAL COMMS]: region not found for QueryAccess");
274 return false; 271 return false;
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
index 387a9b8..c4919b3 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
@@ -239,18 +239,18 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
239 239
240 } 240 }
241 241
242 public bool QueryAccess(GridRegion destination, UUID id) 242 public bool QueryAccess(GridRegion destination, UUID id, Vector3 position)
243 { 243 {
244 if (destination == null) 244 if (destination == null)
245 return false; 245 return false;
246 246
247 // Try local first 247 // Try local first
248 if (m_localBackend.QueryAccess(destination, id)) 248 if (m_localBackend.QueryAccess(destination, id, position))
249 return true; 249 return true;
250 250
251 // else do the remote thing 251 // else do the remote thing
252 if (!m_localBackend.IsLocalRegion(destination.RegionHandle)) 252 if (!m_localBackend.IsLocalRegion(destination.RegionHandle))
253 return m_remoteConnector.QueryAccess(destination, id); 253 return m_remoteConnector.QueryAccess(destination, id, position);
254 254
255 return false; 255 return false;
256 256
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 4325ab8..4fca261 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -4921,7 +4921,7 @@ namespace OpenSim.Region.Framework.Scenes
4921 // from logging into the region, teleporting into the region 4921 // from logging into the region, teleporting into the region
4922 // or corssing the broder walking, but will NOT prevent 4922 // or corssing the broder walking, but will NOT prevent
4923 // child agent creation, thereby emulating the SL behavior. 4923 // child agent creation, thereby emulating the SL behavior.
4924 public bool QueryAccess(UUID agentID) 4924 public bool QueryAccess(UUID agentID, Vector3 position)
4925 { 4925 {
4926 return true; 4926 return true;
4927 } 4927 }