From 64cde6b159e4c4af3f79b5c21b99d4cc93384d49 Mon Sep 17 00:00:00 2001 From: onefang Date: Fri, 27 Aug 2021 05:42:03 +1000 Subject: Allow people to teleport themselves. --- .../Shared/Api/Implementation/OSSL_Api.cs | 28 +++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 362c8c8..40456af 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -999,9 +999,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osTeleportAgent(string agent, string regionName, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat) { + bool check = true; + UUID agentId; + if (UUID.TryParse(agent, out agentId)) + { + if ((null != m_item) && (null != m_item.OwnerID)) + { + UUID ownerID = m_item.OwnerID; + if (ownerID == agentId) + check = false; + } + } // High because there is no security check. High griefer potential - // - CheckThreatLevel(ThreatLevel.Severe, "osTeleportAgent"); + if (check) + CheckThreatLevel(ThreatLevel.Severe, "osTeleportAgent"); TeleportAgent(agent, regionName, position, lookat); } @@ -1046,8 +1057,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osTeleportAgent(string agent, int regionGridX, int regionGridY, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat) { + bool check = true; + UUID agentId; + if (UUID.TryParse(agent, out agentId)) + { + if ((null != m_item) && (null != m_item.OwnerID)) + { + UUID ownerID = m_item.OwnerID; + if (ownerID == agentId) + check = false; + } + } // High because there is no security check. High griefer potential - // + if (check) CheckThreatLevel(ThreatLevel.Severe, "osTeleportAgent"); TeleportAgent(agent, regionGridX, regionGridY, position, lookat); -- cgit v1.1