aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
diff options
context:
space:
mode:
authorCharles Krinke2009-02-23 02:43:51 +0000
committerCharles Krinke2009-02-23 02:43:51 +0000
commit08c76989a719803e4cb7c5391bc864046bba31f2 (patch)
treeb62e6288ba9ce024a5020d0f302a059e44ba457e /OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
parentA little bit more tweaking with appearance. Now passing both the wearables an... (diff)
downloadopensim-SC-08c76989a719803e4cb7c5391bc864046bba31f2.zip
opensim-SC-08c76989a719803e4cb7c5391bc864046bba31f2.tar.gz
opensim-SC-08c76989a719803e4cb7c5391bc864046bba31f2.tar.bz2
opensim-SC-08c76989a719803e4cb7c5391bc864046bba31f2.tar.xz
Mantis#3187. Thank you kindly, DoranZemlja for a patch that:
Adds a warning for an LSL construct that exploits a popular list memory saving hack.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/XEngine/XEngine.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/XEngine.cs32
1 files changed, 32 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
index 75d0bec..40a6dd1 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
@@ -516,6 +516,38 @@ namespace OpenSim.Region.ScriptEngine.XEngine
516 m_AddingAssemblies[assembly]++; 516 m_AddingAssemblies[assembly]++;
517 } 517 }
518 } 518 }
519
520 string[] warnings = m_Compiler.GetWarnings();
521
522 if (warnings != null && warnings.Length != 0)
523 {
524 if (presence != null && (!postOnRez))
525 presence.ControllingClient.SendAgentAlertMessage("Script saved with warnings, check debug window!", false);
526
527 foreach (string warning in warnings)
528 {
529 try
530 {
531 // DISPLAY WARNING INWORLD
532 string text = "Warning:\n" + warning;
533 if (text.Length > 1000)
534 text = text.Substring(0, 1000);
535 World.SimChat(Utils.StringToBytes(text),
536 ChatTypeEnum.DebugChannel, 2147483647,
537 part.AbsolutePosition,
538 part.Name, part.UUID, false);
539 }
540 catch (Exception e2) // LEGIT: User Scripting
541 {
542 m_log.Error("[XEngine]: " +
543 "Error displaying warning in-world: " +
544 e2.ToString());
545 m_log.Error("[XEngine]: " +
546 "Warning:\r\n" +
547 warning);
548 }
549 }
550 }
519 } 551 }
520 catch (Exception e) 552 catch (Exception e)
521 { 553 {