aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes
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/Environment/Scenes
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/Environment/Scenes')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs61
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs2
2 files changed, 45 insertions, 18 deletions
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
34{ 34{
35 public partial class Scene 35 public partial class Scene
36 { 36 {
37 /// <summary> 37 protected void SimChat(byte[] message, ChatTypeEnum type, int channel, LLVector3 fromPos, string fromName,
38 /// 38 LLUUID fromID, bool fromAgent, bool broadcast)
39 /// </summary>
40 /// <param name="message"></param>
41 /// <param name="type"></param>
42 /// <param name="fromPos"></param>
43 /// <param name="fromName"></param>
44 /// <param name="fromAgentID"></param>
45 public void SimChat(byte[] message, ChatTypeEnum type, int channel, LLVector3 fromPos, string fromName,
46 LLUUID fromAgentID)
47 { 39 {
48 ChatFromViewerArgs args = new ChatFromViewerArgs(); 40 ChatFromViewerArgs args = new ChatFromViewerArgs();
49 41
@@ -51,19 +43,56 @@ namespace OpenSim.Region.Environment.Scenes
51 args.Channel = channel; 43 args.Channel = channel;
52 args.Type = type; 44 args.Type = type;
53 args.Position = fromPos; 45 args.Position = fromPos;
54 args.SenderUUID = fromAgentID; 46 args.SenderUUID = fromID;
55 args.Scene = this; 47 args.Scene = this;
56 48
57 ScenePresence user = GetScenePresence(fromAgentID); 49 if (fromAgent)
58 if (user != null) 50 {
59 args.Sender = user.ControllingClient; 51 ScenePresence user = GetScenePresence(fromID);
52 if (user != null)
53 args.Sender = user.ControllingClient;
54 }
60 else 55 else
61 args.Sender = null; 56 {
57 SceneObjectPart obj = GetSceneObjectPart(fromID);
58 args.SenderObject = obj;
59 }
62 60
63 args.From = fromName; 61 args.From = fromName;
64 //args. 62 //args.
65 63
66 EventManager.TriggerOnChatFromWorld(this, args); 64 if (broadcast)
65 EventManager.TriggerOnChatBroadcast(this, args);
66 else
67 EventManager.TriggerOnChatFromWorld(this, args);
68
69 }
70 /// <summary>
71 ///
72 /// </summary>
73 /// <param name="message"></param>
74 /// <param name="type"></param>
75 /// <param name="fromPos"></param>
76 /// <param name="fromName"></param>
77 /// <param name="fromAgentID"></param>
78 public void SimChat(byte[] message, ChatTypeEnum type, int channel, LLVector3 fromPos, string fromName,
79 LLUUID fromID, bool fromAgent)
80 {
81 SimChat(message, type, channel, fromPos, fromName, fromID, fromAgent, false);
82 }
83
84 /// <summary>
85 ///
86 /// </summary>
87 /// <param name="message"></param>
88 /// <param name="type"></param>
89 /// <param name="fromPos"></param>
90 /// <param name="fromName"></param>
91 /// <param name="fromAgentID"></param>
92 public void SimChatBroadcast(byte[] message, ChatTypeEnum type, int channel, LLVector3 fromPos, string fromName,
93 LLUUID fromID, bool fromAgent)
94 {
95 SimChat(message, type, channel, fromPos, fromName, fromID, fromAgent, true);
67 } 96 }
68 97
69 /// <summary> 98 /// <summary>
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
113 public IXfer XferManager; 113 public IXfer XferManager;
114 114
115 protected IHttpRequests m_httpRequestModule; 115 protected IHttpRequests m_httpRequestModule;
116 protected ISimChat m_simChatModule;
117 protected IXMLRPC m_xmlrpcModule; 116 protected IXMLRPC m_xmlrpcModule;
118 protected IWorldComm m_worldCommModule; 117 protected IWorldComm m_worldCommModule;
119 protected IAvatarFactory m_AvatarFactory; 118 protected IAvatarFactory m_AvatarFactory;
@@ -637,7 +636,6 @@ namespace OpenSim.Region.Environment.Scenes
637 /// </summary> 636 /// </summary>
638 public void SetModuleInterfaces() 637 public void SetModuleInterfaces()
639 { 638 {
640 m_simChatModule = RequestModuleInterface<ISimChat>();
641 m_httpRequestModule = RequestModuleInterface<IHttpRequests>(); 639 m_httpRequestModule = RequestModuleInterface<IHttpRequests>();
642 m_xmlrpcModule = RequestModuleInterface<IXMLRPC>(); 640 m_xmlrpcModule = RequestModuleInterface<IXMLRPC>();
643 m_worldCommModule = RequestModuleInterface<IWorldComm>(); 641 m_worldCommModule = RequestModuleInterface<IWorldComm>();