aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs12
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/XEngine.cs12
2 files changed, 16 insertions, 8 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs
index 9999d9c..04fe4cd 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs
@@ -194,12 +194,16 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
194 194
195 public void OnRezScript(uint localID, UUID itemID, string script, int startParam, bool postOnRez, string engine) 195 public void OnRezScript(uint localID, UUID itemID, string script, int startParam, bool postOnRez, string engine)
196 { 196 {
197 if (script.Length > 15) 197 int lineEnd = script.IndexOf('\n');
198
199 if (lineEnd != 1)
198 { 200 {
199 if (script.Substring(0, 15) == "//DotNetEngine:") 201 string firstline = script.Substring(0, lineEnd).Trim();
202
203 int colon = firstline.IndexOf(':');
204 if (firstline.Length > 2 && firstline.Substring(0, 2) == "//" && colon != -1)
200 { 205 {
201 script = "//" + script.Substring(15); 206 engine = firstline.Substring(2, colon-2);
202 engine = "DotNetEngine";
203 } 207 }
204 } 208 }
205 209
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
index 161fd8c..934a1b9 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
@@ -341,12 +341,16 @@ namespace OpenSim.Region.ScriptEngine.XEngine
341 341
342 public void OnRezScript(uint localID, UUID itemID, string script, int startParam, bool postOnRez, string engine) 342 public void OnRezScript(uint localID, UUID itemID, string script, int startParam, bool postOnRez, string engine)
343 { 343 {
344 if (script.Length > 10) 344 int lineEnd = script.IndexOf('\n');
345
346 if (lineEnd != 1)
345 { 347 {
346 if (script.Substring(0, 10) == "//XEngine:") 348 string firstline = script.Substring(0, lineEnd).Trim();
349
350 int colon = firstline.IndexOf(':');
351 if (firstline.Length > 2 && firstline.Substring(0, 2) == "//" && colon != -1)
347 { 352 {
348 script = "//" + script.Substring(10); 353 engine = firstline.Substring(2, colon-2);
349 engine = "XEngine";
350 } 354 }
351 } 355 }
352 356