aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api/Implementation
diff options
context:
space:
mode:
authorMarck2011-01-21 20:00:04 +0100
committerMarck2011-02-17 13:47:13 +0100
commit4f9c3c73ad8cc2178e44c724c72a4bb292e5ea93 (patch)
treec75cf8ee0376322b61a0be5e9f8b5ed257dd47a2 /OpenSim/Region/ScriptEngine/Shared/Api/Implementation
parentMake osTeleportOwner work in foreign regions by relaxing the restrictions on ... (diff)
downloadopensim-SC-4f9c3c73ad8cc2178e44c724c72a4bb292e5ea93.zip
opensim-SC-4f9c3c73ad8cc2178e44c724c72a4bb292e5ea93.tar.gz
opensim-SC-4f9c3c73ad8cc2178e44c724c72a4bb292e5ea93.tar.bz2
opensim-SC-4f9c3c73ad8cc2178e44c724c72a4bb292e5ea93.tar.xz
Add support for new naming syntax of linked regions to osTeleportAgent and osTeleportOwner.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs17
1 files changed, 2 insertions, 15 deletions
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
694 ScenePresence presence = World.GetScenePresence(agentId); 694 ScenePresence presence = World.GetScenePresence(agentId);
695 if (presence != null) 695 if (presence != null)
696 { 696 {
697 // agent must be over owners land to avoid abuse 697 // For osTeleportAgent, agent must be over owners land to avoid abuse
698 // For osTeleportOwner, this restriction isn't necessary
698 if (relaxRestrictions || 699 if (relaxRestrictions ||
699 m_host.OwnerID 700 m_host.OwnerID
700 == World.LandChannel.GetLandObject( 701 == World.LandChannel.GetLandObject(
701 presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID) 702 presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID)
702 { 703 {
703 // Check for hostname, attempt to make a HG link,
704 // and convert the regionName to the target region
705 if (regionName.Contains(".") && regionName.Contains(":"))
706 {
707 // Even though we use none of the results, we need to perform this call because it appears
708 // to have some the side effect of setting up hypergrid teleport locations.
709 World.GridService.GetRegionsByName(World.RegionInfo.ScopeID, regionName, 1);
710// List<GridRegion> regions = World.GridService.GetRegionsByName(World.RegionInfo.ScopeID, regionName, 1);
711
712 string[] parts = regionName.Split(new char[] { ':' });
713 if (parts.Length > 2)
714 regionName = parts[0] + ':' + parts[1] + "/ " + parts[2];
715 regionName = "http://" + regionName;
716 }
717 World.RequestTeleportLocation(presence.ControllingClient, regionName, 704 World.RequestTeleportLocation(presence.ControllingClient, regionName,
718 new Vector3((float)position.x, (float)position.y, (float)position.z), 705 new Vector3((float)position.x, (float)position.y, (float)position.z),
719 new Vector3((float)lookat.x, (float)lookat.y, (float)lookat.z), (uint)TPFlags.ViaLocation); 706 new Vector3((float)lookat.x, (float)lookat.y, (float)lookat.z), (uint)TPFlags.ViaLocation);