aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
authorDr Scofield2008-05-26 15:37:31 +0000
committerDr Scofield2008-05-26 15:37:31 +0000
commit1bb1d5d9b06887380eec0696102eb859f04810e6 (patch)
treefecd69763a3daeba464a1bcbc1349828dd9445b3 /OpenSim/Region/ScriptEngine
parentAdding OnChatBroadcast event logic to EventManager providing (diff)
downloadopensim-SC_OLD-1bb1d5d9b06887380eec0696102eb859f04810e6.zip
opensim-SC_OLD-1bb1d5d9b06887380eec0696102eb859f04810e6.tar.gz
opensim-SC_OLD-1bb1d5d9b06887380eec0696102eb859f04810e6.tar.bz2
opensim-SC_OLD-1bb1d5d9b06887380eec0696102eb859f04810e6.tar.xz
This cleans up a merge mess from the earlier checkin and implements llOwnerSay()
via the newly created Scene.SimBroadcast() call.
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs10
-rw-r--r--OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs22
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs4
4 files changed, 18 insertions, 20 deletions
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
285 m_LSL_Functions.llShout(channelID, text); 285 m_LSL_Functions.llShout(channelID, text);
286 } 286 }
287 287
288 public void llOwnerSay(string msg)
289 {
290 m_LSL_Functions.llOwnerSay(msg);
291 }
292
288 public void llRegionSay(int channelID, string text) 293 public void llRegionSay(int channelID, string text)
289 { 294 {
290 m_LSL_Functions.llRegionSay(channelID, text); 295 m_LSL_Functions.llRegionSay(channelID, text);
@@ -1673,11 +1678,6 @@ namespace OpenSim.Region.ScriptEngine.Common
1673 return m_LSL_Functions.llGetInventoryCreator(item); 1678 return m_LSL_Functions.llGetInventoryCreator(item);
1674 } 1679 }
1675 1680
1676 public void llOwnerSay(string msg)
1677 {
1678 m_LSL_Functions.llOwnerSay(msg);
1679 }
1680
1681 public void llRequestSimulatorData(string simulator, int data) 1681 public void llRequestSimulatorData(string simulator, int data)
1682 { 1682 {
1683 m_LSL_Functions.llRequestSimulatorData(simulator, data); 1683 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
50 /// </summary> 50 /// </summary>
51 public class LSL_BuiltIn_Commands : MarshalByRefObject, LSL_BuiltIn_Commands_Interface 51 public class LSL_BuiltIn_Commands : MarshalByRefObject, LSL_BuiltIn_Commands_Interface
52 { 52 {
53 // private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); 53 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
54 54
55 internal ScriptEngineBase.ScriptEngine m_ScriptEngine; 55 internal ScriptEngineBase.ScriptEngine m_ScriptEngine;
56 internal SceneObjectPart m_host; 56 internal SceneObjectPart m_host;
@@ -409,7 +409,7 @@ namespace OpenSim.Region.ScriptEngine.Common
409 { 409 {
410 m_host.AddScriptLPS(1); 410 m_host.AddScriptLPS(1);
411 World.SimChat(Helpers.StringToField(text), 411 World.SimChat(Helpers.StringToField(text),
412 ChatTypeEnum.Whisper, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID); 412 ChatTypeEnum.Whisper, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID, false);
413 413
414 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); 414 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
415 wComm.DeliverMessage(ChatTypeEnum.Whisper, channelID, m_host.Name, m_host.UUID, text); 415 wComm.DeliverMessage(ChatTypeEnum.Whisper, channelID, m_host.Name, m_host.UUID, text);
@@ -419,7 +419,7 @@ namespace OpenSim.Region.ScriptEngine.Common
419 { 419 {
420 m_host.AddScriptLPS(1); 420 m_host.AddScriptLPS(1);
421 World.SimChat(Helpers.StringToField(text), 421 World.SimChat(Helpers.StringToField(text),
422 ChatTypeEnum.Say, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID); 422 ChatTypeEnum.Say, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID, false);
423 423
424 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); 424 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
425 wComm.DeliverMessage(ChatTypeEnum.Say, channelID, m_host.Name, m_host.UUID, text); 425 wComm.DeliverMessage(ChatTypeEnum.Say, channelID, m_host.Name, m_host.UUID, text);
@@ -429,7 +429,7 @@ namespace OpenSim.Region.ScriptEngine.Common
429 { 429 {
430 m_host.AddScriptLPS(1); 430 m_host.AddScriptLPS(1);
431 World.SimChat(Helpers.StringToField(text), 431 World.SimChat(Helpers.StringToField(text),
432 ChatTypeEnum.Shout, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID); 432 ChatTypeEnum.Shout, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID, false);
433 433
434 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); 434 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
435 wComm.DeliverMessage(ChatTypeEnum.Shout, channelID, m_host.Name, m_host.UUID, text); 435 wComm.DeliverMessage(ChatTypeEnum.Shout, channelID, m_host.Name, m_host.UUID, text);
@@ -5478,15 +5478,13 @@ namespace OpenSim.Region.ScriptEngine.Common
5478 5478
5479 public void llOwnerSay(string msg) 5479 public void llOwnerSay(string msg)
5480 { 5480 {
5481 //m_host.AddScriptLPS(1); // since we reuse llInstantMessage 5481 m_host.AddScriptLPS(1);
5482 //temp fix so that lsl wiki examples aren't annoying to use to test other functions 5482 World.SimChatBroadcast(Helpers.StringToField(msg),
5483 //should be similar to : llInstantMessage(llGetOwner(),msg) 5483 ChatTypeEnum.Owner, 0, m_host.AbsolutePosition,
5484 // llGetOwner ==> m_host.ObjectOwner.ToString() 5484 m_host.Name, m_host.UUID, false);
5485 llInstantMessage(m_host.ObjectOwner.ToString(),msg);
5486 5485
5487 //World.SimChat(Helpers.StringToField(msg), ChatTypeEnum.Owner, 0, m_host.AbsolutePosition, m_host.Name, m_host.UUID); 5486 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
5488 //IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); 5487 wComm.DeliverMessage(ChatTypeEnum.Owner, 0, m_host.Name, m_host.UUID, msg);
5489 //wComm.DeliverMessage(ChatTypeEnum.Owner, 0, m_host.Name, m_host.UUID, msg);
5490 } 5488 }
5491 5489
5492 public void llRequestSimulatorData(string simulator, int data) 5490 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
333 m_ScriptEngine.World.SimChat(Helpers.StringToField(text), 333 m_ScriptEngine.World.SimChat(Helpers.StringToField(text),
334 ChatTypeEnum.DebugChannel, 2147483647, 334 ChatTypeEnum.DebugChannel, 2147483647,
335 m_host.AbsolutePosition, 335 m_host.AbsolutePosition,
336 m_host.Name, m_host.UUID); 336 m_host.Name, m_host.UUID, false);
337 } 337 }
338 catch (Exception) 338 catch (Exception)
339 { 339 {
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs
index bfa9951..087f688 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs
@@ -140,8 +140,8 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
140 string text = "Error compiling script:\r\n" + e.Message.ToString(); 140 string text = "Error compiling script:\r\n" + e.Message.ToString();
141 if (text.Length > 1500) 141 if (text.Length > 1500)
142 text = text.Substring(0, 1500); 142 text = text.Substring(0, 1500);
143 World.SimChat(Helpers.StringToField(text), ChatTypeEnum.DebugChannel, 2147483647, m_host.AbsolutePosition, 143 World.SimChat(Helpers.StringToField(text), ChatTypeEnum.DebugChannel, 2147483647,
144 m_host.Name, m_host.UUID); 144 m_host.AbsolutePosition, m_host.Name, m_host.UUID, false);
145 } 145 }
146 catch (Exception e2) // LEGIT: User Scripting 146 catch (Exception e2) // LEGIT: User Scripting
147 { 147 {