diff options
author | Adam Frisby | 2008-11-08 18:07:33 +0000 |
---|---|---|
committer | Adam Frisby | 2008-11-08 18:07:33 +0000 |
commit | bec51a9580bd3cc498adb89f3110d964ee5d3c62 (patch) | |
tree | 09e6f7aac414610c62e4a3286dc76b67cbe47485 /OpenSim/Region/Environment/Modules | |
parent | CIA test (diff) | |
download | opensim-SC_OLD-bec51a9580bd3cc498adb89f3110d964ee5d3c62.zip opensim-SC_OLD-bec51a9580bd3cc498adb89f3110d964ee5d3c62.tar.gz opensim-SC_OLD-bec51a9580bd3cc498adb89f3110d964ee5d3c62.tar.bz2 opensim-SC_OLD-bec51a9580bd3cc498adb89f3110d964ee5d3c62.tar.xz |
* Ported InstantMessageModule to IClientCore
* See http://opensimulator.org/wiki/OpenSim_0.6_IClientAPI#InstantMessageModule.cs
Diffstat (limited to 'OpenSim/Region/Environment/Modules')
-rw-r--r-- | OpenSim/Region/Environment/Modules/Avatar/InstantMessage/InstantMessageModule.cs | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/InstantMessageModule.cs b/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/InstantMessageModule.cs index b8fbe2b..a673f7b 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/InstantMessageModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/InstantMessageModule.cs | |||
@@ -35,6 +35,7 @@ using log4net; | |||
35 | using Nini.Config; | 35 | using Nini.Config; |
36 | using Nwc.XmlRpc; | 36 | using Nwc.XmlRpc; |
37 | using OpenSim.Framework; | 37 | using OpenSim.Framework; |
38 | using OpenSim.Framework.Client; | ||
38 | using OpenSim.Region.Environment.Interfaces; | 39 | using OpenSim.Region.Environment.Interfaces; |
39 | using OpenSim.Region.Environment.Scenes; | 40 | using OpenSim.Region.Environment.Scenes; |
40 | 41 | ||
@@ -74,12 +75,21 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage | |||
74 | if (!m_scenes.Contains(scene)) | 75 | if (!m_scenes.Contains(scene)) |
75 | { | 76 | { |
76 | m_scenes.Add(scene); | 77 | m_scenes.Add(scene); |
77 | scene.EventManager.OnNewClient += OnNewClient; | 78 | scene.EventManager.OnClientConnect += OnClientConnect; |
78 | scene.EventManager.OnGridInstantMessage += OnGridInstantMessage; | 79 | scene.EventManager.OnGridInstantMessage += OnGridInstantMessage; |
79 | } | 80 | } |
80 | } | 81 | } |
81 | } | 82 | } |
82 | 83 | ||
84 | void OnClientConnect(IClientCore client) | ||
85 | { | ||
86 | IClientIM clientIM; | ||
87 | if(client.TryGet(out clientIM)) | ||
88 | { | ||
89 | clientIM.OnInstantMessage += OnInstantMessage; | ||
90 | } | ||
91 | } | ||
92 | |||
83 | private void ReadConfig(IConfigSource config) | 93 | private void ReadConfig(IConfigSource config) |
84 | { | 94 | { |
85 | IConfig cnf = config.Configs["Startup"]; | 95 | IConfig cnf = config.Configs["Startup"]; |
@@ -109,11 +119,6 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage | |||
109 | 119 | ||
110 | #endregion | 120 | #endregion |
111 | 121 | ||
112 | private void OnNewClient(IClientAPI client) | ||
113 | { | ||
114 | client.OnInstantMessage += OnInstantMessage; | ||
115 | } | ||
116 | |||
117 | private void OnInstantMessage(IClientAPI client, UUID fromAgentID, | 122 | private void OnInstantMessage(IClientAPI client, UUID fromAgentID, |
118 | UUID fromAgentSession, UUID toAgentID, | 123 | UUID fromAgentSession, UUID toAgentID, |
119 | UUID imSessionID, uint timestamp, string fromAgentName, | 124 | UUID imSessionID, uint timestamp, string fromAgentName, |