Mantis #2317
Thank you, fusspawn, for an implementation of osGetSimulatorVersion. This patch removes the llRequestSimulatorData(..., 128) hack and implements the functionality as an osFunction.0.6.0-stable
parent
4e3a3417c7
commit
e30856a32f
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -71,6 +71,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
|||
void osSetRegionWaterHeight(double height);
|
||||
|
||||
string osGetScriptEngineName();
|
||||
string osGetSimulatorVersion();
|
||||
void osSetParcelMediaTime(double time);
|
||||
Hashtable osParseJSON(string JSON);
|
||||
|
||||
|
|
|
@ -214,6 +214,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
|||
{
|
||||
return m_OSSL_Functions.osGetScriptEngineName();
|
||||
}
|
||||
|
||||
public string osGetSimulatorVersion()
|
||||
{
|
||||
return m_OSSL_Functions.osGetSimulatorVersion();
|
||||
}
|
||||
|
||||
|
||||
//for testing purposes only
|
||||
|
|
Loading…
Reference in New Issue