diff options
author | Dr Scofield | 2008-10-03 14:53:11 +0000 |
---|---|---|
committer | Dr Scofield | 2008-10-03 14:53:11 +0000 |
commit | 5c0a0bc2e0951745fd52f5c01f2ee2c0aee49a3a (patch) | |
tree | 529c2c8e3ea8f1193f2495f905e542ff1462adb6 /OpenSim/Region/Environment/Modules/Scripting/WorldComm | |
parent | * minor: remove warnings (the code cleaners strike again) (diff) | |
download | opensim-SC_OLD-5c0a0bc2e0951745fd52f5c01f2ee2c0aee49a3a.zip opensim-SC_OLD-5c0a0bc2e0951745fd52f5c01f2ee2c0aee49a3a.tar.gz opensim-SC_OLD-5c0a0bc2e0951745fd52f5c01f2ee2c0aee49a3a.tar.bz2 opensim-SC_OLD-5c0a0bc2e0951745fd52f5c01f2ee2c0aee49a3a.tar.xz |
This changeset changes the way chat from client is routed:
old way: each region module interested in chat from client had to
- subscribe to scene.EventManager.OnNewClient
- then in its OnNewClient delegate it would subscribe to
client.OnChatFromViewer to capture chat messages coming
new way: ChatModule is the only region module that uses the "old
way" approach but is now forwarding all client chat via
scene.EventManager.OnChatFromClient
- each region module interested in chat from client now only
subscribes to scene.EventManager.OnChatFromClient
this not only simplifies code, but also allows us to substitute
ChatModule with derived classes (ConciergeModule is going to be one
example).
Also, this changeset changes ChatFromViewer to ChatFromClient as it
doesn't necessarily have to be a viewer that is a chat source.
i've taken great care to only comment out those OnNewClient delegates
that were only used for getting at the client chat --- hope it's not
breaking anything.
Diffstat (limited to 'OpenSim/Region/Environment/Modules/Scripting/WorldComm')
-rw-r--r-- | OpenSim/Region/Environment/Modules/Scripting/WorldComm/WorldCommModule.cs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/OpenSim/Region/Environment/Modules/Scripting/WorldComm/WorldCommModule.cs b/OpenSim/Region/Environment/Modules/Scripting/WorldComm/WorldCommModule.cs index ae5eefc..f5ec389 100644 --- a/OpenSim/Region/Environment/Modules/Scripting/WorldComm/WorldCommModule.cs +++ b/OpenSim/Region/Environment/Modules/Scripting/WorldComm/WorldCommModule.cs | |||
@@ -116,7 +116,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm | |||
116 | m_scene = scene; | 116 | m_scene = scene; |
117 | m_scene.RegisterModuleInterface<IWorldComm>(this); | 117 | m_scene.RegisterModuleInterface<IWorldComm>(this); |
118 | m_listenerManager = new ListenerManager(maxlisteners, maxhandles); | 118 | m_listenerManager = new ListenerManager(maxlisteners, maxhandles); |
119 | m_scene.EventManager.OnNewClient += NewClient; | 119 | m_scene.EventManager.OnChatFromClient += DeliverClientMessage; |
120 | m_pendingQ = new Queue(); | 120 | m_pendingQ = new Queue(); |
121 | m_pending = Queue.Synchronized(m_pendingQ); | 121 | m_pending = Queue.Synchronized(m_pendingQ); |
122 | } | 122 | } |
@@ -203,7 +203,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm | |||
203 | /// enqueue the message for delivery to the objects listen event handler. | 203 | /// enqueue the message for delivery to the objects listen event handler. |
204 | /// The enqueued ListenerInfo no longer has filter values, but the actually trigged values. | 204 | /// The enqueued ListenerInfo no longer has filter values, but the actually trigged values. |
205 | /// Objects that do an llSay have their messages delivered here and for nearby avatars, | 205 | /// Objects that do an llSay have their messages delivered here and for nearby avatars, |
206 | /// the OnChatFromViewer event is used. | 206 | /// the OnChatFromClient event is used. |
207 | /// </summary> | 207 | /// </summary> |
208 | /// <param name="type">type of delvery (whisper,say,shout or regionwide)</param> | 208 | /// <param name="type">type of delvery (whisper,say,shout or regionwide)</param> |
209 | /// <param name="channel">channel to sent on</param> | 209 | /// <param name="channel">channel to sent on</param> |
@@ -311,10 +311,10 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm | |||
311 | 311 | ||
312 | #endregion | 312 | #endregion |
313 | 313 | ||
314 | private void NewClient(IClientAPI client) | 314 | // private void NewClient(IClientAPI client) |
315 | { | 315 | // { |
316 | client.OnChatFromViewer += DeliverClientMessage; | 316 | // client.OnChatFromViewer += DeliverClientMessage; |
317 | } | 317 | // } |
318 | 318 | ||
319 | /******************************************************************** | 319 | /******************************************************************** |
320 | * | 320 | * |