From e30856a32f27ecb21b4b0f0b93e80539a631a1b2 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Fri, 3 Oct 2008 01:30:22 +0000 Subject: Mantis #2317 Thank you, fusspawn, for an implementation of osGetSimulatorVersion. This patch removes the llRequestSimulatorData(..., 128) hack and implements the functionality as an osFunction. --- .../ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 3 --- .../ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 39e24b4..39636b6 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -7227,9 +7227,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api else reply = "UNKNOWN"; break; - case 128: // SIM_RELEASE (not LSL conform, valid for OpenSim only) - reply = m_ScriptEngine.World.GetSimulatorVersion(); - break; default: // ScriptSleep(1000); return UUID.Zero.ToString(); // Raise no event diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 7a9a648..c5e6359 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -30,6 +30,7 @@ using System.Collections.Generic; using System.Runtime.Remoting.Lifetime; using OpenMetaverse; using Nini.Config; +using OpenSim; using OpenSim.Framework.Console; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Scenes; @@ -40,6 +41,7 @@ using OpenSim.Region.ScriptEngine.Interfaces; using OpenSim.Region.ScriptEngine.Shared.Api.Interfaces; using TPFlags = OpenSim.Framework.Constants.TeleportFlags; + namespace OpenSim.Region.ScriptEngine.Shared.Api { ////////////////////////////////////////////////////////////// @@ -720,6 +722,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return String.Empty; } } + + public string osGetSimulatorVersion() + { + // High because it can be used to target attacks to known weaknesses + // This would allow a new class of griefer scripts that don't even + // require their user to know what they are doing (see script + // kiddie) + // + CheckThreatLevel(ThreatLevel.High,"osGetSimulatorVersion"); + m_host.AddScriptLPS(1); + return m_ScriptEngine.World.GetSimulatorVersion(); + } //for testing purposes only -- cgit v1.1