From 427240f935dabeeee272d8c84ed90af5a497b133 Mon Sep 17 00:00:00 2001 From: Edward Date: Mon, 15 Sep 2014 11:56:49 -0700 Subject: Changes to be committed: modified: OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs modified: OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs This solves mantis bug# 5005: llRegionSay script does not trigger ChatFromWorld event. This was solved by adding World.SimChat() command to the llRegionSay() function (per suggestion of DrCuriosity). Additionally this fixes llRegionSayTo() which was also not functioning by adding a World.SimChat() command and adding a new SimChatToAgent() overrided function to Scene.PacketHandlers.cs This is the second patch revision. Corrections made to the position of World.SimChat() and removal of tabs per suggestion by justincc. --- OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs | 15 +++++++++++++++ .../ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 6 ++++++ 2 files changed, 21 insertions(+) diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs index cddf818..ea242f5 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs @@ -145,6 +145,21 @@ namespace OpenSim.Region.Framework.Scenes } /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + public void SimChatToAgent(UUID targetID, byte[] message, int channel, Vector3 fromPos, string fromName, UUID fromID, bool fromAgent) + { + SimChat(message, ChatTypeEnum.Region, channel, fromPos, fromName, fromID, targetID, fromAgent, false); + } + + /// /// Invoked when the client requests a prim. /// /// diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 7c384b2..e7ba7a4 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -968,6 +968,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api m_host.AddScriptLPS(1); + World.SimChat(Utils.StringToBytes(text), + ChatTypeEnum.Region, channelID, m_host.ParentGroup.RootPart.AbsolutePosition, m_host.Name, m_host.UUID, false); + IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface(); if (wComm != null) wComm.DeliverMessage(ChatTypeEnum.Region, channelID, m_host.Name, m_host.UUID, text); @@ -988,6 +991,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api UUID TargetID; UUID.TryParse(target, out TargetID); + World.SimChatToAgent(TargetID, Utils.StringToBytes(msg), + channel, m_host.ParentGroup.RootPart.AbsolutePosition, m_host.Name, m_host.UUID, true); + IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface(); if (wComm != null) wComm.DeliverMessageTo(TargetID, channel, m_host.AbsolutePosition, m_host.Name, m_host.UUID, msg); -- cgit v1.1