From 254d3099f03dde79a4e689bcb99e4d67d91f6300 Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Fri, 3 Apr 2009 10:40:14 +0000 Subject: * Implements Scene.SimChat(string,...) rather than byte[]. We should probably mark byte[] as obsolete. * Implements SOPObject.Say for MRM. (Note, not IObject yet) --- OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs | 10 ++++++++++ .../Region/OptionalModules/Scripting/Minimodule/SOPObject.cs | 11 +++++++++++ 2 files changed, 21 insertions(+) (limited to 'OpenSim') diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs index df6672d..4c99873 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs @@ -84,6 +84,16 @@ namespace OpenSim.Region.Framework.Scenes SimChat(message, type, channel, fromPos, fromName, fromID, fromAgent, false); } + public void SimChat(string message, ChatTypeEnum type, Vector3 fromPos, string fromName, UUID fromID, bool fromAgent) + { + SimChat(Utils.StringToBytes(message), type, 0, fromPos, fromName, fromID, fromAgent); + } + + public void SimChat(string message, string fromName) + { + SimChat(message, ChatTypeEnum.Broadcast, Vector3.Zero, fromName, UUID.Zero, false); + } + /// /// /// diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs index 5010a34..12d996a 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs @@ -215,6 +215,17 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule set { throw new System.NotImplementedException(); } } + #region Public Functions + + public void Say(string msg) + { + SceneObjectPart sop = GetSOP(); + + m_rootScene.SimChat(msg, ChatTypeEnum.Say, sop.AbsolutePosition, sop.Name, sop.UUID, false); + } + + #endregion + #region Supporting Functions -- cgit v1.1