diff options
Merge branch 'master' into bigmerge
Conflicts:
OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs
OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs
OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs
OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs index ff74354..712632b 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs | |||
@@ -140,8 +140,11 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
140 | // Try root avatar only first | 140 | // Try root avatar only first |
141 | foreach (Scene scene in m_Scenes) | 141 | foreach (Scene scene in m_Scenes) |
142 | { | 142 | { |
143 | if (scene.Entities.ContainsKey(toAgentID) && | 143 | // m_log.DebugFormat( |
144 | scene.Entities[toAgentID] is ScenePresence) | 144 | // "[INSTANT MESSAGE]: Looking for root agent {0} in {1}", |
145 | // toAgentID.ToString(), scene.RegionInfo.RegionName); | ||
146 | ScenePresence sp = scene.GetScenePresence(toAgentID); | ||
147 | if (sp != null && !sp.IsChildAgent) | ||
145 | { | 148 | { |
146 | // m_log.DebugFormat( | 149 | // m_log.DebugFormat( |
147 | // "[INSTANT MESSAGE]: Looking for root agent {0} in {1}", | 150 | // "[INSTANT MESSAGE]: Looking for root agent {0} in {1}", |
@@ -165,9 +168,8 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
165 | { | 168 | { |
166 | // m_log.DebugFormat( | 169 | // m_log.DebugFormat( |
167 | // "[INSTANT MESSAGE]: Looking for child of {0} in {1}", toAgentID, scene.RegionInfo.RegionName); | 170 | // "[INSTANT MESSAGE]: Looking for child of {0} in {1}", toAgentID, scene.RegionInfo.RegionName); |
168 | 171 | ScenePresence sp = scene.GetScenePresence(toAgentID); | |
169 | if (scene.Entities.ContainsKey(toAgentID) && | 172 | if (sp != null) |
170 | scene.Entities[toAgentID] is ScenePresence) | ||
171 | { | 173 | { |
172 | // Local message | 174 | // Local message |
173 | ScenePresence user = (ScenePresence) scene.Entities[toAgentID]; | 175 | ScenePresence user = (ScenePresence) scene.Entities[toAgentID]; |
@@ -405,17 +407,11 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
405 | // Trigger the Instant message in the scene. | 407 | // Trigger the Instant message in the scene. |
406 | foreach (Scene scene in m_Scenes) | 408 | foreach (Scene scene in m_Scenes) |
407 | { | 409 | { |
408 | if (scene.Entities.ContainsKey(toAgentID) && | 410 | ScenePresence sp = scene.GetScenePresence(toAgentID); |
409 | scene.Entities[toAgentID] is ScenePresence) | 411 | if (sp != null && !sp.IsChildAgent) |
410 | { | 412 | { |
411 | ScenePresence user = | 413 | scene.EventManager.TriggerIncomingInstantMessage(gim); |
412 | (ScenePresence)scene.Entities[toAgentID]; | 414 | successful = true; |
413 | |||
414 | if (!user.IsChildAgent) | ||
415 | { | ||
416 | scene.EventManager.TriggerIncomingInstantMessage(gim); | ||
417 | successful = true; | ||
418 | } | ||
419 | } | 415 | } |
420 | } | 416 | } |
421 | if (!successful) | 417 | if (!successful) |