From 1bb1d5d9b06887380eec0696102eb859f04810e6 Mon Sep 17 00:00:00 2001 From: Dr Scofield Date: Mon, 26 May 2008 15:37:31 +0000 Subject: This cleans up a merge mess from the earlier checkin and implements llOwnerSay() via the newly created Scene.SimBroadcast() call. --- .../Common/BuiltIn_Commands_BaseClass.cs | 10 +++++----- .../ScriptEngine/Common/LSL_BuiltIn_Commands.cs | 22 ++++++++++------------ .../ScriptEngineBase/EventQueueThreadClass.cs | 2 +- 3 files changed, 16 insertions(+), 18 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Common') diff --git a/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs b/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs index 2c33b57..07db853 100644 --- a/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs +++ b/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs @@ -285,6 +285,11 @@ namespace OpenSim.Region.ScriptEngine.Common m_LSL_Functions.llShout(channelID, text); } + public void llOwnerSay(string msg) + { + m_LSL_Functions.llOwnerSay(msg); + } + public void llRegionSay(int channelID, string text) { m_LSL_Functions.llRegionSay(channelID, text); @@ -1673,11 +1678,6 @@ namespace OpenSim.Region.ScriptEngine.Common return m_LSL_Functions.llGetInventoryCreator(item); } - public void llOwnerSay(string msg) - { - m_LSL_Functions.llOwnerSay(msg); - } - public void llRequestSimulatorData(string simulator, int data) { m_LSL_Functions.llRequestSimulatorData(simulator, data); diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index 9446844..efdf249 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs @@ -50,7 +50,7 @@ namespace OpenSim.Region.ScriptEngine.Common /// public class LSL_BuiltIn_Commands : MarshalByRefObject, LSL_BuiltIn_Commands_Interface { - // private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); internal ScriptEngineBase.ScriptEngine m_ScriptEngine; internal SceneObjectPart m_host; @@ -409,7 +409,7 @@ namespace OpenSim.Region.ScriptEngine.Common { m_host.AddScriptLPS(1); World.SimChat(Helpers.StringToField(text), - ChatTypeEnum.Whisper, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID); + ChatTypeEnum.Whisper, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID, false); IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface(); wComm.DeliverMessage(ChatTypeEnum.Whisper, channelID, m_host.Name, m_host.UUID, text); @@ -419,7 +419,7 @@ namespace OpenSim.Region.ScriptEngine.Common { m_host.AddScriptLPS(1); World.SimChat(Helpers.StringToField(text), - ChatTypeEnum.Say, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID); + ChatTypeEnum.Say, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID, false); IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface(); wComm.DeliverMessage(ChatTypeEnum.Say, channelID, m_host.Name, m_host.UUID, text); @@ -429,7 +429,7 @@ namespace OpenSim.Region.ScriptEngine.Common { m_host.AddScriptLPS(1); World.SimChat(Helpers.StringToField(text), - ChatTypeEnum.Shout, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID); + ChatTypeEnum.Shout, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID, false); IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface(); wComm.DeliverMessage(ChatTypeEnum.Shout, channelID, m_host.Name, m_host.UUID, text); @@ -5478,15 +5478,13 @@ namespace OpenSim.Region.ScriptEngine.Common public void llOwnerSay(string msg) { - //m_host.AddScriptLPS(1); // since we reuse llInstantMessage - //temp fix so that lsl wiki examples aren't annoying to use to test other functions - //should be similar to : llInstantMessage(llGetOwner(),msg) - // llGetOwner ==> m_host.ObjectOwner.ToString() - llInstantMessage(m_host.ObjectOwner.ToString(),msg); + m_host.AddScriptLPS(1); + World.SimChatBroadcast(Helpers.StringToField(msg), + ChatTypeEnum.Owner, 0, m_host.AbsolutePosition, + m_host.Name, m_host.UUID, false); - //World.SimChat(Helpers.StringToField(msg), ChatTypeEnum.Owner, 0, m_host.AbsolutePosition, m_host.Name, m_host.UUID); - //IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface(); - //wComm.DeliverMessage(ChatTypeEnum.Owner, 0, m_host.Name, m_host.UUID, msg); + IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface(); + wComm.DeliverMessage(ChatTypeEnum.Owner, 0, m_host.Name, m_host.UUID, msg); } public void llRequestSimulatorData(string simulator, int data) diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs index 6f266c3..64d6a75 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs @@ -333,7 +333,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase m_ScriptEngine.World.SimChat(Helpers.StringToField(text), ChatTypeEnum.DebugChannel, 2147483647, m_host.AbsolutePosition, - m_host.Name, m_host.UUID); + m_host.Name, m_host.UUID, false); } catch (Exception) { -- cgit v1.1