diff options
author | Melanie Thielker | 2008-10-03 01:30:22 +0000 |
---|---|---|
committer | Melanie Thielker | 2008-10-03 01:30:22 +0000 |
commit | e30856a32f27ecb21b4b0f0b93e80539a631a1b2 (patch) | |
tree | 043ef62c12162072f5fa407eafd1201cf62017d7 /OpenSim/Region/ScriptEngine/Shared/Api/Implementation | |
parent | Mantis #2282. (diff) | |
download | opensim-SC_OLD-e30856a32f27ecb21b4b0f0b93e80539a631a1b2.zip opensim-SC_OLD-e30856a32f27ecb21b4b0f0b93e80539a631a1b2.tar.gz opensim-SC_OLD-e30856a32f27ecb21b4b0f0b93e80539a631a1b2.tar.bz2 opensim-SC_OLD-e30856a32f27ecb21b4b0f0b93e80539a631a1b2.tar.xz |
Mantis #2317
Thank you, fusspawn, for an implementation of osGetSimulatorVersion.
This patch removes the llRequestSimulatorData(..., 128) hack and
implements the functionality as an osFunction.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 3 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 14 |
2 files changed, 14 insertions, 3 deletions
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 | |||
7227 | else | 7227 | else |
7228 | reply = "UNKNOWN"; | 7228 | reply = "UNKNOWN"; |
7229 | break; | 7229 | break; |
7230 | case 128: // SIM_RELEASE (not LSL conform, valid for OpenSim only) | ||
7231 | reply = m_ScriptEngine.World.GetSimulatorVersion(); | ||
7232 | break; | ||
7233 | default: | 7230 | default: |
7234 | // ScriptSleep(1000); | 7231 | // ScriptSleep(1000); |
7235 | return UUID.Zero.ToString(); // Raise no event | 7232 | 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; | |||
30 | using System.Runtime.Remoting.Lifetime; | 30 | using System.Runtime.Remoting.Lifetime; |
31 | using OpenMetaverse; | 31 | using OpenMetaverse; |
32 | using Nini.Config; | 32 | using Nini.Config; |
33 | using OpenSim; | ||
33 | using OpenSim.Framework.Console; | 34 | using OpenSim.Framework.Console; |
34 | using OpenSim.Region.Environment.Interfaces; | 35 | using OpenSim.Region.Environment.Interfaces; |
35 | using OpenSim.Region.Environment.Scenes; | 36 | using OpenSim.Region.Environment.Scenes; |
@@ -40,6 +41,7 @@ using OpenSim.Region.ScriptEngine.Interfaces; | |||
40 | using OpenSim.Region.ScriptEngine.Shared.Api.Interfaces; | 41 | using OpenSim.Region.ScriptEngine.Shared.Api.Interfaces; |
41 | using TPFlags = OpenSim.Framework.Constants.TeleportFlags; | 42 | using TPFlags = OpenSim.Framework.Constants.TeleportFlags; |
42 | 43 | ||
44 | |||
43 | namespace OpenSim.Region.ScriptEngine.Shared.Api | 45 | namespace OpenSim.Region.ScriptEngine.Shared.Api |
44 | { | 46 | { |
45 | ////////////////////////////////////////////////////////////// | 47 | ////////////////////////////////////////////////////////////// |
@@ -720,6 +722,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
720 | return String.Empty; | 722 | return String.Empty; |
721 | } | 723 | } |
722 | } | 724 | } |
725 | |||
726 | public string osGetSimulatorVersion() | ||
727 | { | ||
728 | // High because it can be used to target attacks to known weaknesses | ||
729 | // This would allow a new class of griefer scripts that don't even | ||
730 | // require their user to know what they are doing (see script | ||
731 | // kiddie) | ||
732 | // | ||
733 | CheckThreatLevel(ThreatLevel.High,"osGetSimulatorVersion"); | ||
734 | m_host.AddScriptLPS(1); | ||
735 | return m_ScriptEngine.World.GetSimulatorVersion(); | ||
736 | } | ||
723 | 737 | ||
724 | 738 | ||
725 | //for testing purposes only | 739 | //for testing purposes only |