diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/InstantMessage/HGMessageTransferModule.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/InstantMessage/HGMessageTransferModule.cs | 31 |
1 files changed, 6 insertions, 25 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/HGMessageTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/HGMessageTransferModule.cs index a1b918a..16e2ec3 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/HGMessageTransferModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/HGMessageTransferModule.cs | |||
@@ -144,11 +144,11 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
144 | foreach (Scene scene in m_Scenes) | 144 | foreach (Scene scene in m_Scenes) |
145 | { | 145 | { |
146 | // m_log.DebugFormat( | 146 | // m_log.DebugFormat( |
147 | // "[HG INSTANT MESSAGE]: Looking for root agent {0} in {1}", | 147 | // "[HG INSTANT MESSAGE]: Looking for root agent {0} in {1}", |
148 | // toAgentID.ToString(), scene.RegionInfo.RegionName); | 148 | // toAgentID.ToString(), scene.RegionInfo.RegionName); |
149 | ScenePresence sp = scene.GetScenePresence(toAgentID); | 149 | ScenePresence sp = scene.GetScenePresence(toAgentID); |
150 | if (sp != null && !sp.IsChildAgent) | 150 | if (sp != null && !sp.IsChildAgent && !sp.IsDeleted) |
151 | { | 151 | { |
152 | // Local message | 152 | // Local message |
153 | // m_log.DebugFormat("[HG INSTANT MESSAGE]: Delivering IM to root agent {0} {1}", user.Name, toAgentID); | 153 | // m_log.DebugFormat("[HG INSTANT MESSAGE]: Delivering IM to root agent {0} {1}", user.Name, toAgentID); |
154 | sp.ControllingClient.SendInstantMessage(im); | 154 | sp.ControllingClient.SendInstantMessage(im); |
@@ -159,25 +159,6 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
159 | } | 159 | } |
160 | } | 160 | } |
161 | 161 | ||
162 | // try child avatar second | ||
163 | foreach (Scene scene in m_Scenes) | ||
164 | { | ||
165 | // m_log.DebugFormat( | ||
166 | // "[HG INSTANT MESSAGE]: Looking for child of {0} in {1}", | ||
167 | // toAgentID, scene.RegionInfo.RegionName); | ||
168 | ScenePresence sp = scene.GetScenePresence(toAgentID); | ||
169 | if (sp != null) | ||
170 | { | ||
171 | // Local message | ||
172 | // m_log.DebugFormat("[HG INSTANT MESSAGE]: Delivering IM to child agent {0} {1}", user.Name, toAgentID); | ||
173 | sp.ControllingClient.SendInstantMessage(im); | ||
174 | |||
175 | // Message sent | ||
176 | result(true); | ||
177 | return; | ||
178 | } | ||
179 | } | ||
180 | |||
181 | // m_log.DebugFormat("[HG INSTANT MESSAGE]: Delivering IM to {0} via XMLRPC", im.toAgentID); | 162 | // m_log.DebugFormat("[HG INSTANT MESSAGE]: Delivering IM to {0} via XMLRPC", im.toAgentID); |
182 | // Is the user a local user? | 163 | // Is the user a local user? |
183 | string url = string.Empty; | 164 | string url = string.Empty; |
@@ -224,7 +205,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
224 | foreach (Scene scene in m_Scenes) | 205 | foreach (Scene scene in m_Scenes) |
225 | { | 206 | { |
226 | ScenePresence sp = scene.GetScenePresence(toAgentID); | 207 | ScenePresence sp = scene.GetScenePresence(toAgentID); |
227 | if(sp != null && !sp.IsChildAgent) | 208 | if(sp != null && !sp.IsChildAgent && !sp.IsDeleted) |
228 | { | 209 | { |
229 | scene.EventManager.TriggerIncomingInstantMessage(gim); | 210 | scene.EventManager.TriggerIncomingInstantMessage(gim); |
230 | successful = true; | 211 | successful = true; |
@@ -310,7 +291,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
310 | foreach (Scene scene in m_Scenes) | 291 | foreach (Scene scene in m_Scenes) |
311 | { | 292 | { |
312 | ScenePresence presence = scene.GetScenePresence(agentID); | 293 | ScenePresence presence = scene.GetScenePresence(agentID); |
313 | if (presence != null && !presence.IsChildAgent) | 294 | if (presence != null && !presence.IsChildAgent && !presence.IsDeleted) |
314 | return presence.ControllingClient; | 295 | return presence.ControllingClient; |
315 | } | 296 | } |
316 | } | 297 | } |