mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 03:45:35 +08:00
Merge branch 'master' into careminster
This commit is contained in:
@@ -433,11 +433,16 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
|
||||
string reason;
|
||||
string version;
|
||||
if (!m_aScene.SimulationService.QueryAccess(finalDestination, sp.ControllingClient.AgentId, Vector3.Zero, out version, out reason))
|
||||
if (!m_aScene.SimulationService.QueryAccess(
|
||||
finalDestination, sp.ControllingClient.AgentId, Vector3.Zero, out version, out reason))
|
||||
{
|
||||
sp.ControllingClient.SendTeleportFailed("Teleport failed: " + reason);
|
||||
sp.ControllingClient.SendTeleportFailed(reason);
|
||||
ResetFromTransit(sp.UUID);
|
||||
|
||||
m_log.DebugFormat(
|
||||
"[ENTITY TRANSFER MODULE]: {0} was stopped from teleporting from {1} to {2} because {3}",
|
||||
sp.Name, sp.Scene.RegionInfo.RegionName, finalDestination.RegionName, reason);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -480,10 +485,13 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
bool logout = false;
|
||||
if (!CreateAgent(sp, reg, finalDestination, agentCircuit, teleportFlags, out reason, out logout))
|
||||
{
|
||||
sp.ControllingClient.SendTeleportFailed(
|
||||
String.Format("Teleport refused: {0}", reason));
|
||||
sp.ControllingClient.SendTeleportFailed(String.Format("Teleport refused: {0}", reason));
|
||||
ResetFromTransit(sp.UUID);
|
||||
|
||||
m_log.DebugFormat(
|
||||
"[ENTITY TRANSFER MODULE]: Teleport of {0} from {1} to {2} was refused because {3}",
|
||||
sp.Name, sp.Scene.RegionInfo.RegionName, finalDestination.RegionName, reason);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -450,19 +450,17 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Is the given user an administrator (in other words, a god)?
|
||||
/// Is the user regarded as an administrator?
|
||||
/// </summary>
|
||||
/// <param name="user"></param>
|
||||
/// <returns></returns>
|
||||
protected bool IsAdministrator(UUID user)
|
||||
{
|
||||
if (user == UUID.Zero) return false;
|
||||
|
||||
if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero)
|
||||
{
|
||||
if (m_scene.RegionInfo.EstateSettings.EstateOwner == user && m_RegionOwnerIsGod)
|
||||
return true;
|
||||
}
|
||||
if (user == UUID.Zero)
|
||||
return false;
|
||||
|
||||
if (m_scene.RegionInfo.EstateSettings.EstateOwner == user && m_RegionOwnerIsGod)
|
||||
return true;
|
||||
|
||||
if (IsEstateManager(user) && m_RegionManagerIsGod)
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user