aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules/ContentManagementSystem
diff options
context:
space:
mode:
authorDr Scofield2008-10-03 14:53:11 +0000
committerDr Scofield2008-10-03 14:53:11 +0000
commit5c0a0bc2e0951745fd52f5c01f2ee2c0aee49a3a (patch)
tree529c2c8e3ea8f1193f2495f905e542ff1462adb6 /OpenSim/Region/Environment/Modules/ContentManagementSystem
parent* minor: remove warnings (the code cleaners strike again) (diff)
downloadopensim-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/ContentManagementSystem')
-rw-r--r--OpenSim/Region/Environment/Modules/ContentManagementSystem/CMController.cs5
1 files changed, 3 insertions, 2 deletions
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMController.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMController.cs
index cdd4f4e..6eaaacd 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMController.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMController.cs
@@ -381,7 +381,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
381 protected void StartManaging(IClientAPI client) 381 protected void StartManaging(IClientAPI client)
382 { 382 {
383 m_log.Debug("[CONTENT MANAGEMENT] Registering channel with chat services."); 383 m_log.Debug("[CONTENT MANAGEMENT] Registering channel with chat services.");
384 client.OnChatFromViewer += SimChatSent; 384 // client.OnChatFromClient += SimChatSent;
385 //init = true; 385 //init = true;
386 386
387 OnNewClient(client); 387 OnNewClient(client);
@@ -412,7 +412,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
412 { 412 {
413 IClientAPI client = presence.ControllingClient; 413 IClientAPI client = presence.ControllingClient;
414 m_log.Debug("[CONTENT MANAGEMENT] Unregistering channel with chat services."); 414 m_log.Debug("[CONTENT MANAGEMENT] Unregistering channel with chat services.");
415 client.OnChatFromViewer -= SimChatSent; 415 // client.OnChatFromViewer -= SimChatSent;
416 416
417 m_log.Debug("[CONTENT MANAGEMENT] Removing handlers to client"); 417 m_log.Debug("[CONTENT MANAGEMENT] Removing handlers to client");
418 client.OnUpdatePrimScale -= UpdateSingleScale; 418 client.OnUpdatePrimScale -= UpdateSingleScale;
@@ -641,6 +641,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
641 m_log.Debug("[CONTENT MANAGEMENT] Initializing Content Management System."); 641 m_log.Debug("[CONTENT MANAGEMENT] Initializing Content Management System.");
642 642
643 scene.EventManager.OnNewClient += StartManaging; 643 scene.EventManager.OnNewClient += StartManaging;
644 scene.EventManager.OnChatFromClient += SimChatSent;
644 scene.EventManager.OnRemovePresence += StopManaging; 645 scene.EventManager.OnRemovePresence += StopManaging;
645 // scene.EventManager.OnAvatarEnteringNewParcel += AvatarEnteringParcel; 646 // scene.EventManager.OnAvatarEnteringNewParcel += AvatarEnteringParcel;
646 scene.EventManager.OnObjectBeingRemovedFromScene += GroupBeingDeleted; 647 scene.EventManager.OnObjectBeingRemovedFromScene += GroupBeingDeleted;