From d9aaf51561ea7bb2ee030c648611a5281f21ec49 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Thu, 25 Oct 2012 02:52:20 +0100
Subject: When scripts generate expected exceptions (e.g. due to checked bad
parameter) throw ScriptException instead of just a plain old exception.
This is to make it easier to distinguish these exceptions from unexpected OpenSimulator problems internally and in regression tests.
No functional changes.
---
OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs')
diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
index 6e53951..99bf72a 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
@@ -38,7 +38,6 @@ namespace OpenSim.Region.Framework.Scenes
{
public partial class Scene
{
-
protected void SimChat(byte[] message, ChatTypeEnum type, int channel, Vector3 fromPos, string fromName,
UUID fromID, UUID targetID, bool fromAgent, bool broadcast)
{
@@ -66,6 +65,10 @@ namespace OpenSim.Region.Framework.Scenes
args.From = fromName;
args.TargetUUID = targetID;
+// m_log.DebugFormat(
+// "[SCENE]: Sending message {0} on channel {1}, type {2} from {3}, broadcast {4}",
+// args.Message.Replace("\n", "\\n"), args.Channel, args.Type, fromName, broadcast);
+
if (broadcast)
EventManager.TriggerOnChatBroadcast(this, args);
else
--
cgit v1.1
From c13a99dc5cc82efac5497dab27dcb6b0d9865cea Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Thu, 25 Oct 2012 03:26:12 +0100
Subject: Fix script error messages not showing up in viewer 3 and associated
viewers.
Viewer 3 will discard such a message if the chat message owner does not match the avatar.
We were filling the ownerID with the primID, so this never matched, hence viewer 3 did not see any script error messages.
This commit fills the ownerID in with the prim ownerID so the script owner will receive script error messages.
This does not affect viewer 1 and associated viewers which continue to process script errors as normal.
---
OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs | 12 ++++++++++++
1 file changed, 12 insertions(+)
(limited to 'OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs')
diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
index 99bf72a..df43271 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
@@ -38,6 +38,18 @@ namespace OpenSim.Region.Framework.Scenes
{
public partial class Scene
{
+ ///
+ /// Send chat to listeners.
+ ///
+ ///
+ /// /param>
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
protected void SimChat(byte[] message, ChatTypeEnum type, int channel, Vector3 fromPos, string fromName,
UUID fromID, UUID targetID, bool fromAgent, bool broadcast)
{
--
cgit v1.1