diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 28 |
1 files changed, 25 insertions, 3 deletions
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 | |||
999 | 999 | ||
1000 | public void osTeleportAgent(string agent, string regionName, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat) | 1000 | public void osTeleportAgent(string agent, string regionName, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat) |
1001 | { | 1001 | { |
1002 | bool check = true; | ||
1003 | UUID agentId; | ||
1004 | if (UUID.TryParse(agent, out agentId)) | ||
1005 | { | ||
1006 | if ((null != m_item) && (null != m_item.OwnerID)) | ||
1007 | { | ||
1008 | UUID ownerID = m_item.OwnerID; | ||
1009 | if (ownerID == agentId) | ||
1010 | check = false; | ||
1011 | } | ||
1012 | } | ||
1002 | // High because there is no security check. High griefer potential | 1013 | // High because there is no security check. High griefer potential |
1003 | // | 1014 | if (check) |
1004 | CheckThreatLevel(ThreatLevel.Severe, "osTeleportAgent"); | 1015 | CheckThreatLevel(ThreatLevel.Severe, "osTeleportAgent"); |
1005 | 1016 | ||
1006 | TeleportAgent(agent, regionName, position, lookat); | 1017 | TeleportAgent(agent, regionName, position, lookat); |
1007 | } | 1018 | } |
@@ -1046,8 +1057,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1046 | 1057 | ||
1047 | public void osTeleportAgent(string agent, int regionGridX, int regionGridY, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat) | 1058 | public void osTeleportAgent(string agent, int regionGridX, int regionGridY, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat) |
1048 | { | 1059 | { |
1060 | bool check = true; | ||
1061 | UUID agentId; | ||
1062 | if (UUID.TryParse(agent, out agentId)) | ||
1063 | { | ||
1064 | if ((null != m_item) && (null != m_item.OwnerID)) | ||
1065 | { | ||
1066 | UUID ownerID = m_item.OwnerID; | ||
1067 | if (ownerID == agentId) | ||
1068 | check = false; | ||
1069 | } | ||
1070 | } | ||
1049 | // High because there is no security check. High griefer potential | 1071 | // High because there is no security check. High griefer potential |
1050 | // | 1072 | if (check) |
1051 | CheckThreatLevel(ThreatLevel.Severe, "osTeleportAgent"); | 1073 | CheckThreatLevel(ThreatLevel.Severe, "osTeleportAgent"); |
1052 | 1074 | ||
1053 | TeleportAgent(agent, regionGridX, regionGridY, position, lookat); | 1075 | TeleportAgent(agent, regionGridX, regionGridY, position, lookat); |