From adedd70c352581bc447452f5835c10853c77bea8 Mon Sep 17 00:00:00 2001 From: BlueWall Date: Sun, 10 Feb 2013 13:01:33 -0500 Subject: [PATCH] Fix teleport/telehub issue: Fix bug that allowed only login access to regions with mis-configured telehubs. Administrators now have teleport access when there exists a mis-configured telehub in the region. Estate owners are now placed at region center in the absence of spawnpoints instead of being denied access. Grid Gods are unrestricted. All others are denied access to the region until spawnpoints are assigned to the telehub object. --- OpenSim/Region/Framework/Scenes/Scene.cs | 9 +++++++-- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 11 ++++++++++- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index de3978c4db..9b17b7f650 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -5506,8 +5506,13 @@ namespace OpenSim.Region.Framework.Scenes if (banned) { - reason = "No suitable landing point found"; - return false; + if(Permissions.IsAdministrator(agentID) == false || Permissions.IsGridGod(agentID) == false) + { + reason = "No suitable landing point found"; + return false; + } + reason = "Administrative access only"; + return true; } } } diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 6e41774bcf..30bd715f2b 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -4021,6 +4021,7 @@ namespace OpenSim.Region.Framework.Scenes (m_teleportFlags & TeleportFlags.ViaLocation) != 0 || (m_teleportFlags & Constants.TeleportFlags.ViaHGLogin) != 0) { + if (GodLevel < 200 && ((!m_scene.Permissions.IsGod(m_uuid) && !m_scene.RegionInfo.EstateSettings.IsEstateManagerOrOwner(m_uuid)) || @@ -4029,7 +4030,14 @@ namespace OpenSim.Region.Framework.Scenes { SpawnPoint[] spawnPoints = m_scene.RegionInfo.RegionSettings.SpawnPoints().ToArray(); if (spawnPoints.Length == 0) + { + if(m_scene.RegionInfo.EstateSettings.IsEstateManagerOrOwner(m_uuid)) + { + pos.X = 128.0f; + pos.Y = 128.0f; + } return; + } int index; bool selected = false; @@ -4049,7 +4057,8 @@ namespace OpenSim.Region.Framework.Scenes // SpawnPoint sp = spawnPoints[index]; ILandObject land = m_scene.LandChannel.GetLandObject(spawnPosition.X, spawnPosition.Y); - if (land == null || land.IsEitherBannedOrRestricted(UUID)) + if (spawnPoints.Length == 0) + return; if (land == null || land.IsEitherBannedOrRestricted(UUID)) selected = false; else selected = true;