From e444cb9da4fd112733634dbda8b2844e69097ec4 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Thu, 17 May 2012 00:33:04 +0100
Subject: Remove redundant "Teleport failed:" from reason when QueryAccess
fails for the destination simulator. This part of the string is already
provided by the viewer.
Also adds more reason logging for diagnostics when teleports are refused/fail.
---
.../Framework/EntityTransfer/EntityTransferModule.cs | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
(limited to 'OpenSim/Region/CoreModules')
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index d0aead5..5dbe5e4 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -432,11 +432,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;
}
@@ -479,10 +484,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;
}
--
cgit v1.1
From 6b6a00a3d593ce164d23135cb3fe570a511e1793 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Thu, 17 May 2012 01:30:50 +0100
Subject: minor: Remove redundant EstateOwner != UUID.Zero check in
IsAdministrator because checking EstateOwner == user
Due to an earlier check we already know that user != UUID.Zero so if EstateOwner == UUID.Zero, EstateOwner == user can never be true
---
.../CoreModules/World/Permissions/PermissionsModule.cs | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
(limited to 'OpenSim/Region/CoreModules')
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
index 7d75fad..555509c 100644
--- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
+++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
@@ -450,19 +450,17 @@ namespace OpenSim.Region.CoreModules.World.Permissions
}
///
- /// Is the given user an administrator (in other words, a god)?
+ /// Is the user regarded as an administrator?
///
///
///
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;
--
cgit v1.1