From 0b4e15bc3586422d273bd8845962a2db681230e2 Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Thu, 8 Nov 2007 03:11:10 +0000 Subject: converted hard-coded chat type values to ChatTypeEnum --- .../DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs | 10 +++------- OpenSim/Grid/ScriptEngine/DotNetEngine/EventQueueManager.cs | 3 ++- OpenSim/Grid/ScriptEngine/DotNetEngine/ScriptManager.cs | 3 ++- 3 files changed, 7 insertions(+), 9 deletions(-) (limited to 'OpenSim/Grid') diff --git a/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs b/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs index 7bc3ce4..64921d7 100644 --- a/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs @@ -270,24 +270,20 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler public void llWhisper(int channelID, string text) { - //type for whisper is 0 World.SimChat(Helpers.StringToField(text), - 0, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID); + ChatTypeEnum.Whisper, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID); } public void llSay(int channelID, string text) { - //type for say is 1 - World.SimChat(Helpers.StringToField(text), - 1, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID); + ChatTypeEnum.Say, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID); } public void llShout(int channelID, string text) { - //type for shout is 2 World.SimChat(Helpers.StringToField(text), - 2, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID); + ChatTypeEnum.Shout, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID); } public int llListen(int channelID, string name, string ID, string msg) diff --git a/OpenSim/Grid/ScriptEngine/DotNetEngine/EventQueueManager.cs b/OpenSim/Grid/ScriptEngine/DotNetEngine/EventQueueManager.cs index 31d090f..91d4558 100644 --- a/OpenSim/Grid/ScriptEngine/DotNetEngine/EventQueueManager.cs +++ b/OpenSim/Grid/ScriptEngine/DotNetEngine/EventQueueManager.cs @@ -31,6 +31,7 @@ using System.Collections; using System.Collections.Generic; using System.Threading; using libsecondlife; +using OpenSim.Framework; using OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler.LSL; using OpenSim.Region.Environment.Scenes.Scripting; @@ -205,7 +206,7 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine IScriptHost m_host = m_ScriptEngine.World.GetSceneObjectPart(QIS.localID); //if (m_host != null) //{ - m_ScriptEngine.World.SimChat(Helpers.StringToField(text), 1, 0, + m_ScriptEngine.World.SimChat(Helpers.StringToField(text), ChatTypeEnum.Say, 0, m_host.AbsolutePosition, m_host.Name, m_host.UUID); } catch diff --git a/OpenSim/Grid/ScriptEngine/DotNetEngine/ScriptManager.cs b/OpenSim/Grid/ScriptEngine/DotNetEngine/ScriptManager.cs index 2149bf0..85e9a9c 100644 --- a/OpenSim/Grid/ScriptEngine/DotNetEngine/ScriptManager.cs +++ b/OpenSim/Grid/ScriptEngine/DotNetEngine/ScriptManager.cs @@ -33,6 +33,7 @@ using System.Reflection; using System.Runtime.Serialization.Formatters.Binary; using System.Threading; using libsecondlife; +using OpenSim.Framework; using OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler; using OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler.LSL; using OpenSim.Region.Environment.Scenes; @@ -318,7 +319,7 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine string text = "Error compiling script:\r\n" + e.Message.ToString(); if (text.Length > 1500) text = text.Substring(0, 1500); - World.SimChat(Helpers.StringToField(text), 1, 0, m_host.AbsolutePosition, m_host.Name, m_host.UUID); + World.SimChat(Helpers.StringToField(text), ChatTypeEnum.Say, 0, m_host.AbsolutePosition, m_host.Name, m_host.UUID); } catch (Exception e2) { -- cgit v1.1