aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
authorJeff Ames2007-11-08 03:11:10 +0000
committerJeff Ames2007-11-08 03:11:10 +0000
commit0b4e15bc3586422d273bd8845962a2db681230e2 (patch)
treef3394ee384d7b20fc8c1f0eee4ebda3c10203a1a /OpenSim/Region/ScriptEngine
parent* Added Rotational Velocity reporting for Client Interpolation to Terse Updates (diff)
downloadopensim-SC_OLD-0b4e15bc3586422d273bd8845962a2db681230e2.zip
opensim-SC_OLD-0b4e15bc3586422d273bd8845962a2db681230e2.tar.gz
opensim-SC_OLD-0b4e15bc3586422d273bd8845962a2db681230e2.tar.bz2
opensim-SC_OLD-0b4e15bc3586422d273bd8845962a2db681230e2.tar.xz
converted hard-coded chat type values to ChatTypeEnum
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs15
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/EventQueueManager.cs3
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs3
3 files changed, 10 insertions, 11 deletions
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs
index 737dee6..e3504d3 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs
@@ -270,32 +270,29 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
270 270
271 public void llWhisper(int channelID, string text) 271 public void llWhisper(int channelID, string text)
272 { 272 {
273 //type for whisper is 0
274 World.SimChat(Helpers.StringToField(text), 273 World.SimChat(Helpers.StringToField(text),
275 0, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID); 274 ChatTypeEnum.Whisper, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID);
276 275
277 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); 276 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
278 wComm.DeliverMessage(m_host.UUID.ToString(), 0, channelID, m_host.Name, text); 277 wComm.DeliverMessage(m_host.UUID.ToString(), ChatTypeEnum.Whisper, channelID, m_host.Name, text);
279 } 278 }
280 279
281 public void llSay(int channelID, string text) 280 public void llSay(int channelID, string text)
282 { 281 {
283 //type for say is 1
284 World.SimChat(Helpers.StringToField(text), 282 World.SimChat(Helpers.StringToField(text),
285 1, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID); 283 ChatTypeEnum.Say, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID);
286 284
287 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); 285 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
288 wComm.DeliverMessage(m_host.UUID.ToString(), 1, channelID, m_host.Name, text); 286 wComm.DeliverMessage(m_host.UUID.ToString(), ChatTypeEnum.Say, channelID, m_host.Name, text);
289 } 287 }
290 288
291 public void llShout(int channelID, string text) 289 public void llShout(int channelID, string text)
292 { 290 {
293 //type for shout is 2
294 World.SimChat(Helpers.StringToField(text), 291 World.SimChat(Helpers.StringToField(text),
295 2, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID); 292 ChatTypeEnum.Shout, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID);
296 293
297 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); 294 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
298 wComm.DeliverMessage(m_host.UUID.ToString(), 2, channelID, m_host.Name, text); 295 wComm.DeliverMessage(m_host.UUID.ToString(), ChatTypeEnum.Shout, channelID, m_host.Name, text);
299 } 296 }
300 297
301 public int llListen(int channelID, string name, string ID, string msg) 298 public int llListen(int channelID, string name, string ID, string msg)
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/EventQueueManager.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/EventQueueManager.cs
index f215dd5..d79a8a6 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/EventQueueManager.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/EventQueueManager.cs
@@ -31,6 +31,7 @@ using System.Collections;
31using System.Collections.Generic; 31using System.Collections.Generic;
32using System.Threading; 32using System.Threading;
33using libsecondlife; 33using libsecondlife;
34using OpenSim.Framework;
34using OpenSim.Region.Environment.Scenes.Scripting; 35using OpenSim.Region.Environment.Scenes.Scripting;
35using OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL; 36using OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL;
36 37
@@ -212,7 +213,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
212 IScriptHost m_host = m_ScriptEngine.World.GetSceneObjectPart(QIS.localID); 213 IScriptHost m_host = m_ScriptEngine.World.GetSceneObjectPart(QIS.localID);
213 //if (m_host != null) 214 //if (m_host != null)
214 //{ 215 //{
215 m_ScriptEngine.World.SimChat(Helpers.StringToField(text), 1, 0, 216 m_ScriptEngine.World.SimChat(Helpers.StringToField(text), ChatTypeEnum.Say, 0,
216 m_host.AbsolutePosition, m_host.Name, m_host.UUID); 217 m_host.AbsolutePosition, m_host.Name, m_host.UUID);
217 } 218 }
218 catch 219 catch
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs
index a3cf9f7..5b6a9d1 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs
@@ -33,6 +33,7 @@ using System.Reflection;
33using System.Runtime.Serialization.Formatters.Binary; 33using System.Runtime.Serialization.Formatters.Binary;
34using System.Threading; 34using System.Threading;
35using libsecondlife; 35using libsecondlife;
36using OpenSim.Framework;
36using OpenSim.Region.Environment.Scenes; 37using OpenSim.Region.Environment.Scenes;
37using OpenSim.Region.ScriptEngine.DotNetEngine.Compiler; 38using OpenSim.Region.ScriptEngine.DotNetEngine.Compiler;
38using OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL; 39using OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL;
@@ -323,7 +324,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
323 string text = "Error compiling script:\r\n" + e.Message.ToString(); 324 string text = "Error compiling script:\r\n" + e.Message.ToString();
324 if (text.Length > 1500) 325 if (text.Length > 1500)
325 text = text.Substring(0, 1500); 326 text = text.Substring(0, 1500);
326 World.SimChat(Helpers.StringToField(text), 1, 0, m_host.AbsolutePosition, m_host.Name, m_host.UUID); 327 World.SimChat(Helpers.StringToField(text), ChatTypeEnum.Say, 0, m_host.AbsolutePosition, m_host.Name, m_host.UUID);
327 } 328 }
328 catch (Exception e2) 329 catch (Exception e2)
329 { 330 {