aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEdward2014-09-15 11:56:49 -0700
committerJustin Clark-Casey (justincc)2014-09-17 23:37:18 +0100
commit427240f935dabeeee272d8c84ed90af5a497b133 (patch)
treeccf26c83fa8fd12ad4dbd6bf2bfa56a03cc72730
parentRevert "Small changes to threading to send thread names to unmanaged threads.... (diff)
downloadopensim-SC-427240f935dabeeee272d8c84ed90af5a497b133.zip
opensim-SC-427240f935dabeeee272d8c84ed90af5a497b133.tar.gz
opensim-SC-427240f935dabeeee272d8c84ed90af5a497b133.tar.bz2
opensim-SC-427240f935dabeeee272d8c84ed90af5a497b133.tar.xz
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.
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs15
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs6
2 files changed, 21 insertions, 0 deletions
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
145 } 145 }
146 146
147 /// <summary> 147 /// <summary>
148 ///
149 /// </summary>
150 /// <param name="message"></param>
151 /// <param name="type"></param>
152 /// <param name="channel"></param>
153 /// <param name="fromPos"></param>
154 /// <param name="fromName"></param>
155 /// <param name="fromAgentID"></param>
156 /// <param name="targetID"></param>
157 public void SimChatToAgent(UUID targetID, byte[] message, int channel, Vector3 fromPos, string fromName, UUID fromID, bool fromAgent)
158 {
159 SimChat(message, ChatTypeEnum.Region, channel, fromPos, fromName, fromID, targetID, fromAgent, false);
160 }
161
162 /// <summary>
148 /// Invoked when the client requests a prim. 163 /// Invoked when the client requests a prim.
149 /// </summary> 164 /// </summary>
150 /// <param name="primLocalID"></param> 165 /// <param name="primLocalID"></param>
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
968 968
969 m_host.AddScriptLPS(1); 969 m_host.AddScriptLPS(1);
970 970
971 World.SimChat(Utils.StringToBytes(text),
972 ChatTypeEnum.Region, channelID, m_host.ParentGroup.RootPart.AbsolutePosition, m_host.Name, m_host.UUID, false);
973
971 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); 974 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
972 if (wComm != null) 975 if (wComm != null)
973 wComm.DeliverMessage(ChatTypeEnum.Region, channelID, m_host.Name, m_host.UUID, text); 976 wComm.DeliverMessage(ChatTypeEnum.Region, channelID, m_host.Name, m_host.UUID, text);
@@ -988,6 +991,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
988 UUID TargetID; 991 UUID TargetID;
989 UUID.TryParse(target, out TargetID); 992 UUID.TryParse(target, out TargetID);
990 993
994 World.SimChatToAgent(TargetID, Utils.StringToBytes(msg),
995 channel, m_host.ParentGroup.RootPart.AbsolutePosition, m_host.Name, m_host.UUID, true);
996
991 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); 997 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
992 if (wComm != null) 998 if (wComm != null)
993 wComm.DeliverMessageTo(TargetID, channel, m_host.AbsolutePosition, m_host.Name, m_host.UUID, msg); 999 wComm.DeliverMessageTo(TargetID, channel, m_host.AbsolutePosition, m_host.Name, m_host.UUID, msg);