Make bans work for teleport. Now teleport will complete block if the user

is not allowed on the estate. If the user is allowed on no parcel, the
teleport will also be blocked. If the user is allowed on a parcel, but
not the desired one, the user will be shifted to the closest allowed
location.
This commit is contained in:
Melanie
2011-01-27 02:16:41 +01:00
parent 3c075aaf46
commit 11c742a5a8
4 changed files with 56 additions and 57 deletions

View File

@@ -281,6 +281,12 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
return;
}
if (!m_aScene.SimulationService.QueryAccess(finalDestination, sp.ControllingClient.AgentId))
{
sp.ControllingClient.SendTeleportFailed("The destination region has refused access");
return;
}
sp.ControllingClient.SendTeleportStart(teleportFlags);
// the avatar.Close below will clear the child region list. We need this below for (possibly)

View File

@@ -264,13 +264,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
foreach (Scene s in m_sceneList)
{
if (s.RegionInfo.RegionHandle == destination.RegionHandle)
{
//m_log.Debug("[LOCAL COMMS]: Found region to send QueryAccess");
if (s.RegionInfo.RegionID == destination.RegionID)
return s.QueryAccess(id);
}
}
//m_log.Debug("[LOCAL COMMS]: region not found for QueryAccess");
return false;
}