From 3b4af8a0dc30e65b6f5c12d9f312f83be7ed240d Mon Sep 17 00:00:00 2001 From: Marck Date: Mon, 20 Dec 2010 01:36:39 +0100 Subject: Fix osTeleportAgent and osTeleportOwner for the case that GridService is used with a storage provider other than NullRegionData. --- .../ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 5a796b8..bca08fb 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -698,21 +698,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api == World.LandChannel.GetLandObject( presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID) { - // Check for hostname , attempt to make a hglink + // Check for hostname, attempt to make a HG link, // and convert the regionName to the target region if (regionName.Contains(".") && regionName.Contains(":")) { List regions = World.GridService.GetRegionsByName(World.RegionInfo.ScopeID, regionName, 1); - // Try to link the region - if (regions != null && regions.Count > 0) - { - GridRegion regInfo = regions[0]; - string[] parts = regInfo.RegionName.Split(new char[] { ':' }); - if (parts.Length > 2) - regionName = parts[2]; - else - regionName = parts[0]; - } + 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), -- cgit v1.1