From 1602ba61759ce90c38a589d017108c132881d953 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sun, 21 Sep 2008 22:16:17 +0000 Subject: Allows to use the new script engine feature. Begin your script with //XEngine: or //DotNetEnine: , optionally followed by a language like //XEngine:lsl, and it will be run on the chosen engine. --- .../Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs') diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs index 4a4e808..9999d9c 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs @@ -194,6 +194,15 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase public void OnRezScript(uint localID, UUID itemID, string script, int startParam, bool postOnRez, string engine) { + if (script.Length > 15) + { + if (script.Substring(0, 15) == "//DotNetEngine:") + { + script = "//" + script.Substring(15); + engine = "DotNetEngine"; + } + } + if (engine != "DotNetEngine") return; -- cgit v1.1