aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/XEngine/XEngine.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/XEngine.cs45
1 files changed, 32 insertions, 13 deletions
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
index 847da8c..7b19ce3 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
@@ -604,9 +604,6 @@ namespace OpenSim.Region.ScriptEngine.XEngine
604 604
605 if (warnings != null && warnings.Length != 0) 605 if (warnings != null && warnings.Length != 0)
606 { 606 {
607 if (presence != null && (!postOnRez))
608 presence.ControllingClient.SendAgentAlertMessage("Script saved with warnings, check debug window!", false);
609
610 foreach (string warning in warnings) 607 foreach (string warning in warnings)
611 { 608 {
612 try 609 try
@@ -615,10 +612,17 @@ namespace OpenSim.Region.ScriptEngine.XEngine
615 string text = "Warning:\n" + warning; 612 string text = "Warning:\n" + warning;
616 if (text.Length > 1000) 613 if (text.Length > 1000)
617 text = text.Substring(0, 1000); 614 text = text.Substring(0, 1000);
618 World.SimChat(Utils.StringToBytes(text), 615 if (!ShowScriptSaveResponse(item.OwnerID,
619 ChatTypeEnum.DebugChannel, 2147483647, 616 assetID, text, true))
620 part.AbsolutePosition, 617 {
621 part.Name, part.UUID, false); 618 if (presence != null && (!postOnRez))
619 presence.ControllingClient.SendAgentAlertMessage("Script saved with warnings, check debug window!", false);
620
621 World.SimChat(Utils.StringToBytes(text),
622 ChatTypeEnum.DebugChannel, 2147483647,
623 part.AbsolutePosition,
624 part.Name, part.UUID, false);
625 }
622 } 626 }
623 catch (Exception e2) // LEGIT: User Scripting 627 catch (Exception e2) // LEGIT: User Scripting
624 { 628 {
@@ -634,8 +638,6 @@ namespace OpenSim.Region.ScriptEngine.XEngine
634 } 638 }
635 catch (Exception e) 639 catch (Exception e)
636 { 640 {
637 if (presence != null && (!postOnRez))
638 presence.ControllingClient.SendAgentAlertMessage("Script saved with errors, check debug window!", false);
639 try 641 try
640 { 642 {
641 // DISPLAY ERROR INWORLD 643 // DISPLAY ERROR INWORLD
@@ -645,10 +647,16 @@ namespace OpenSim.Region.ScriptEngine.XEngine
645 string text = "Error compiling script '" + item.Name + "':\n" + e.Message.ToString(); 647 string text = "Error compiling script '" + item.Name + "':\n" + e.Message.ToString();
646 if (text.Length > 1000) 648 if (text.Length > 1000)
647 text = text.Substring(0, 1000); 649 text = text.Substring(0, 1000);
648 World.SimChat(Utils.StringToBytes(text), 650 if (!ShowScriptSaveResponse(item.OwnerID,
649 ChatTypeEnum.DebugChannel, 2147483647, 651 assetID, text, false))
650 part.AbsolutePosition, 652 {
651 part.Name, part.UUID, false); 653 if (presence != null && (!postOnRez))
654 presence.ControllingClient.SendAgentAlertMessage("Script saved with errors, check debug window!", false);
655 World.SimChat(Utils.StringToBytes(text),
656 ChatTypeEnum.DebugChannel, 2147483647,
657 part.AbsolutePosition,
658 part.Name, part.UUID, false);
659 }
652 } 660 }
653 catch (Exception e2) // LEGIT: User Scripting 661 catch (Exception e2) // LEGIT: User Scripting
654 { 662 {
@@ -732,6 +740,12 @@ namespace OpenSim.Region.ScriptEngine.XEngine
732 m_log.DebugFormat("[XEngine] Loaded script {0}.{1}, script UUID {2}, prim UUID {3} @ {4}", 740 m_log.DebugFormat("[XEngine] Loaded script {0}.{1}, script UUID {2}, prim UUID {3} @ {4}",
733 part.ParentGroup.RootPart.Name, item.Name, assetID, part.UUID, part.ParentGroup.RootPart.AbsolutePosition.ToString()); 741 part.ParentGroup.RootPart.Name, item.Name, assetID, part.UUID, part.ParentGroup.RootPart.AbsolutePosition.ToString());
734 742
743 if (presence != null)
744 {
745 ShowScriptSaveResponse(item.OwnerID,
746 assetID, "Compile successful", true);
747 }
748
735 instance.AppDomain = appDomain; 749 instance.AppDomain = appDomain;
736 instance.LineMap = linemap; 750 instance.LineMap = linemap;
737 751
@@ -1250,5 +1264,10 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1250 1264
1251 return instance.CanBeDeleted(); 1265 return instance.CanBeDeleted();
1252 } 1266 }
1267
1268 private bool ShowScriptSaveResponse(UUID ownerID, UUID assetID, string text, bool compiled)
1269 {
1270 return false;
1271 }
1253 } 1272 }
1254} 1273}