Change the QUERYACCESS method to eliminate spurious access denied messages

This commit is contained in:
Melanie
2011-02-16 05:22:05 +01:00
parent ccd6e5d071
commit cfce0aa448
7 changed files with 42 additions and 16 deletions

View File

@@ -285,9 +285,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
return;
}
if (!m_aScene.SimulationService.QueryAccess(finalDestination, sp.ControllingClient.AgentId, Vector3.Zero))
string reason;
if (!m_aScene.SimulationService.QueryAccess(finalDestination, sp.ControllingClient.AgentId, Vector3.Zero, out reason))
{
sp.ControllingClient.SendTeleportFailed("The destination region has refused access");
sp.ControllingClient.SendTeleportFailed("Teleport failed: " + reason);
return;
}
@@ -324,8 +325,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
agentCircuit.CapsPath = CapsUtil.GetRandomCapsObjectPath();
}
string reason = String.Empty;
// Let's create an agent there if one doesn't exist yet.
bool logout = false;
if (!CreateAgent(sp, reg, finalDestination, agentCircuit, teleportFlags, out reason, out logout))
@@ -797,7 +796,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
GridRegion neighbourRegion = scene.GridService.GetRegionByPosition(scene.RegionInfo.ScopeID, (int)x, (int)y);
if (!scene.SimulationService.QueryAccess(neighbourRegion, agent.ControllingClient.AgentId, newpos))
string reason;
if (!scene.SimulationService.QueryAccess(neighbourRegion, agent.ControllingClient.AgentId, newpos, out reason))
{
agent.ControllingClient.SendAlertMessage("Cannot region cross into banned parcel");
if (r == null)