From 4f9c3c73ad8cc2178e44c724c72a4bb292e5ea93 Mon Sep 17 00:00:00 2001 From: Marck Date: Fri, 21 Jan 2011 20:00:04 +0100 Subject: Add support for new naming syntax of linked regions to osTeleportAgent and osTeleportOwner. --- .../ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 402d3a5..64931d0 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -694,26 +694,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api ScenePresence presence = World.GetScenePresence(agentId); if (presence != null) { - // agent must be over owners land to avoid abuse + // For osTeleportAgent, agent must be over owners land to avoid abuse + // For osTeleportOwner, this restriction isn't necessary if (relaxRestrictions || m_host.OwnerID == World.LandChannel.GetLandObject( presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID) { - // Check for hostname, attempt to make a HG link, - // and convert the regionName to the target region - if (regionName.Contains(".") && regionName.Contains(":")) - { - // Even though we use none of the results, we need to perform this call because it appears - // to have some the side effect of setting up hypergrid teleport locations. - World.GridService.GetRegionsByName(World.RegionInfo.ScopeID, regionName, 1); -// List regions = World.GridService.GetRegionsByName(World.RegionInfo.ScopeID, regionName, 1); - - string[] parts = regionName.Split(new char[] { ':' }); - if (parts.Length > 2) - regionName = parts[0] + ':' + parts[1] + "/ " + parts[2]; - regionName = "http://" + regionName; - } World.RequestTeleportLocation(presence.ControllingClient, regionName, new Vector3((float)position.x, (float)position.y, (float)position.z), new Vector3((float)lookat.x, (float)lookat.y, (float)lookat.z), (uint)TPFlags.ViaLocation); -- cgit v1.1