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.
---
.../Environment/Scenes/Scene.PacketHandlers.cs | 61 ++++++++++++++++------
OpenSim/Region/Environment/Scenes/Scene.cs | 2 -
2 files changed, 45 insertions(+), 18 deletions(-)
(limited to 'OpenSim/Region/Environment/Scenes')
diff --git a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
index 788e80a..8419399 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
@@ -34,16 +34,8 @@ namespace OpenSim.Region.Environment.Scenes
{
public partial class Scene
{
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- public void SimChat(byte[] message, ChatTypeEnum type, int channel, LLVector3 fromPos, string fromName,
- LLUUID fromAgentID)
+ protected void SimChat(byte[] message, ChatTypeEnum type, int channel, LLVector3 fromPos, string fromName,
+ LLUUID fromID, bool fromAgent, bool broadcast)
{
ChatFromViewerArgs args = new ChatFromViewerArgs();
@@ -51,19 +43,56 @@ namespace OpenSim.Region.Environment.Scenes
args.Channel = channel;
args.Type = type;
args.Position = fromPos;
- args.SenderUUID = fromAgentID;
+ args.SenderUUID = fromID;
args.Scene = this;
- ScenePresence user = GetScenePresence(fromAgentID);
- if (user != null)
- args.Sender = user.ControllingClient;
+ if (fromAgent)
+ {
+ ScenePresence user = GetScenePresence(fromID);
+ if (user != null)
+ args.Sender = user.ControllingClient;
+ }
else
- args.Sender = null;
+ {
+ SceneObjectPart obj = GetSceneObjectPart(fromID);
+ args.SenderObject = obj;
+ }
args.From = fromName;
//args.
- EventManager.TriggerOnChatFromWorld(this, args);
+ if (broadcast)
+ EventManager.TriggerOnChatBroadcast(this, args);
+ else
+ EventManager.TriggerOnChatFromWorld(this, args);
+
+ }
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public void SimChat(byte[] message, ChatTypeEnum type, int channel, LLVector3 fromPos, string fromName,
+ LLUUID fromID, bool fromAgent)
+ {
+ SimChat(message, type, channel, fromPos, fromName, fromID, fromAgent, false);
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public void SimChatBroadcast(byte[] message, ChatTypeEnum type, int channel, LLVector3 fromPos, string fromName,
+ LLUUID fromID, bool fromAgent)
+ {
+ SimChat(message, type, channel, fromPos, fromName, fromID, fromAgent, true);
}
///
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index f4ec1a3..4d380f9 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -113,7 +113,6 @@ namespace OpenSim.Region.Environment.Scenes
public IXfer XferManager;
protected IHttpRequests m_httpRequestModule;
- protected ISimChat m_simChatModule;
protected IXMLRPC m_xmlrpcModule;
protected IWorldComm m_worldCommModule;
protected IAvatarFactory m_AvatarFactory;
@@ -637,7 +636,6 @@ namespace OpenSim.Region.Environment.Scenes
///
public void SetModuleInterfaces()
{
- m_simChatModule = RequestModuleInterface();
m_httpRequestModule = RequestModuleInterface();
m_xmlrpcModule = RequestModuleInterface();
m_worldCommModule = RequestModuleInterface();
--
cgit v1.1