aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules/InstantMessageModule.cs
diff options
context:
space:
mode:
authorMW2007-10-29 09:51:23 +0000
committerMW2007-10-29 09:51:23 +0000
commit27f003b68314ea5136632d6f9d14057c96ade1e1 (patch)
tree3bbdb9bb3fac97922768c2f6d0acd5dae3c4278f /OpenSim/Region/Environment/Modules/InstantMessageModule.cs
parentnormalized line endings (diff)
downloadopensim-SC_OLD-27f003b68314ea5136632d6f9d14057c96ade1e1.zip
opensim-SC_OLD-27f003b68314ea5136632d6f9d14057c96ade1e1.tar.gz
opensim-SC_OLD-27f003b68314ea5136632d6f9d14057c96ade1e1.tar.bz2
opensim-SC_OLD-27f003b68314ea5136632d6f9d14057c96ade1e1.tar.xz
Started the process of cleaning up AssetCache and moving most of the code into modules. Have moved TextureRequest handling (from the client) to a module. But even though to start with I just did a little bit of cleaning up of the existing code, it doesn't seem to work as good as the old code so I need to spend more time on it. So for now am committing my changes but with them not in use. So for now all Texture and asset requests are still handled by the old code in AssetCache.
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 }