aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules/InstantMessageModule.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Modules/InstantMessageModule.cs')
-rw-r--r--OpenSim/Region/Environment/Modules/InstantMessageModule.cs17
1 files changed, 11 insertions, 6 deletions
diff --git a/OpenSim/Region/Environment/Modules/InstantMessageModule.cs b/OpenSim/Region/Environment/Modules/InstantMessageModule.cs
index 7c4e2c8..77ff24b 100644
--- a/OpenSim/Region/Environment/Modules/InstantMessageModule.cs
+++ b/OpenSim/Region/Environment/Modules/InstantMessageModule.cs
@@ -39,14 +39,17 @@ namespace OpenSim.Region.Environment.Modules
39 private List<Scene> m_scenes = new List<Scene>(); 39 private List<Scene> m_scenes = new List<Scene>();
40 private LogBase m_log; 40 private LogBase m_log;
41 41
42 public InstantMessageModule()
43 {
44 m_log = OpenSim.Framework.Console.MainLog.Instance;
45 }
46
42 public void Initialise(Scene scene, IConfigSource config) 47 public void Initialise(Scene scene, IConfigSource config)
43 { 48 {
44 if (!m_scenes.Contains(scene)) 49 if (!m_scenes.Contains(scene))
45 { 50 {
46 m_scenes.Add(scene); 51 m_scenes.Add(scene);
47 52 scene.EventManager.OnNewClient += OnNewClient;
48 scene.EventManager.OnNewClient += OnNewClient;
49 m_log = OpenSim.Framework.Console.MainLog.Instance;
50 } 53 }
51 } 54 }
52 55
@@ -69,9 +72,11 @@ namespace OpenSim.Region.Environment.Modules
69 { 72 {
70 // Local Message 73 // Local Message
71 ScenePresence user = (ScenePresence)m_scene.Entities[toAgentID]; 74 ScenePresence user = (ScenePresence)m_scene.Entities[toAgentID];
72 user.ControllingClient.SendInstantMessage(fromAgentID, fromAgentSession, message, 75 if (!user.IsChildAgent)
73 toAgentID, imSessionID, user.Firstname + " " + user.Lastname, dialog, timestamp); 76 {
74 77 user.ControllingClient.SendInstantMessage(fromAgentID, fromAgentSession, message,
78 toAgentID, imSessionID, fromAgentName, dialog, timestamp);
79 }
75 // Message sent 80 // Message sent
76 return; 81 return;
77 } 82 }