aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Addons/Groups
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Addons/Groups')
-rw-r--r--OpenSim/Addons/Groups/GroupsMessagingModule.cs15
1 files changed, 14 insertions, 1 deletions
diff --git a/OpenSim/Addons/Groups/GroupsMessagingModule.cs b/OpenSim/Addons/Groups/GroupsMessagingModule.cs
index 04e2b80..ce4f597 100644
--- a/OpenSim/Addons/Groups/GroupsMessagingModule.cs
+++ b/OpenSim/Addons/Groups/GroupsMessagingModule.cs
@@ -129,9 +129,12 @@ namespace OpenSim.Groups
129 m_sceneList.Add(scene); 129 m_sceneList.Add(scene);
130 130
131 scene.EventManager.OnNewClient += OnNewClient; 131 scene.EventManager.OnNewClient += OnNewClient;
132 scene.EventManager.OnMakeRootAgent += OnMakeRootAgent;
133 scene.EventManager.OnMakeChildAgent += OnMakeChildAgent;
132 scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage; 134 scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage;
133 scene.EventManager.OnClientLogin += OnClientLogin; 135 scene.EventManager.OnClientLogin += OnClientLogin;
134 } 136 }
137
135 public void RegionLoaded(Scene scene) 138 public void RegionLoaded(Scene scene)
136 { 139 {
137 if (!m_groupMessagingEnabled) 140 if (!m_groupMessagingEnabled)
@@ -347,10 +350,20 @@ namespace OpenSim.Groups
347 { 350 {
348 if (m_debugEnabled) m_log.DebugFormat("[Groups.Messaging]: OnInstantMessage registered for {0}", client.Name); 351 if (m_debugEnabled) m_log.DebugFormat("[Groups.Messaging]: OnInstantMessage registered for {0}", client.Name);
349 352
350 client.OnInstantMessage += OnInstantMessage;
351 ResetAgentGroupChatSessions(client.AgentId.ToString()); 353 ResetAgentGroupChatSessions(client.AgentId.ToString());
352 } 354 }
353 355
356 void OnMakeRootAgent(ScenePresence sp)
357 {
358 sp.ControllingClient.OnInstantMessage += OnInstantMessage;
359 }
360
361 void OnMakeChildAgent(ScenePresence sp)
362 {
363 sp.ControllingClient.OnInstantMessage -= OnInstantMessage;
364 }
365
366
354 private void OnGridInstantMessage(GridInstantMessage msg) 367 private void OnGridInstantMessage(GridInstantMessage msg)
355 { 368 {
356 // The instant message module will only deliver messages of dialog types: 369 // The instant message module will only deliver messages of dialog types: