diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/InstantMessage')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs | 10 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs | 28 |
2 files changed, 21 insertions, 17 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs index 3983369..fa935cd 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs | |||
@@ -146,7 +146,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
146 | if (sp != null && !sp.IsChildAgent) | 146 | if (sp != null && !sp.IsChildAgent) |
147 | { | 147 | { |
148 | // Local message | 148 | // Local message |
149 | m_log.DebugFormat("[INSTANT MESSAGE]: Delivering IM to root agent {0} {1}", sp.Name, toAgentID); | 149 | // m_log.DebugFormat("[INSTANT MESSAGE]: Delivering IM to root agent {0} {1}", sp.Name, toAgentID); |
150 | 150 | ||
151 | sp.ControllingClient.SendInstantMessage(im); | 151 | sp.ControllingClient.SendInstantMessage(im); |
152 | 152 | ||
@@ -159,14 +159,14 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
159 | // try child avatar second | 159 | // try child avatar second |
160 | foreach (Scene scene in m_Scenes) | 160 | foreach (Scene scene in m_Scenes) |
161 | { | 161 | { |
162 | m_log.DebugFormat( | 162 | // m_log.DebugFormat( |
163 | "[INSTANT MESSAGE]: Looking for child of {0} in {1}", toAgentID, scene.RegionInfo.RegionName); | 163 | // "[INSTANT MESSAGE]: Looking for child of {0} in {1}", toAgentID, scene.RegionInfo.RegionName); |
164 | 164 | ||
165 | ScenePresence sp = scene.GetScenePresence(toAgentID); | 165 | ScenePresence sp = scene.GetScenePresence(toAgentID); |
166 | if (sp != null) | 166 | if (sp != null) |
167 | { | 167 | { |
168 | // Local message | 168 | // Local message |
169 | m_log.DebugFormat("[INSTANT MESSAGE]: Delivering IM to child agent {0} {1}", sp.Name, toAgentID); | 169 | // m_log.DebugFormat("[INSTANT MESSAGE]: Delivering IM to child agent {0} {1}", sp.Name, toAgentID); |
170 | 170 | ||
171 | sp.ControllingClient.SendInstantMessage(im); | 171 | sp.ControllingClient.SendInstantMessage(im); |
172 | 172 | ||
@@ -176,7 +176,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
176 | } | 176 | } |
177 | } | 177 | } |
178 | 178 | ||
179 | m_log.DebugFormat("[INSTANT MESSAGE]: Delivering IM to {0} via XMLRPC", im.toAgentID); | 179 | // m_log.DebugFormat("[INSTANT MESSAGE]: Delivering IM to {0} via XMLRPC", im.toAgentID); |
180 | 180 | ||
181 | SendGridInstantMessageViaXMLRPC(im, result); | 181 | SendGridInstantMessageViaXMLRPC(im, result); |
182 | } | 182 | } |
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs index 4aaf1fe..7d763fa 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs | |||
@@ -186,17 +186,21 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
186 | 186 | ||
187 | foreach (GridInstantMessage im in msglist) | 187 | foreach (GridInstantMessage im in msglist) |
188 | { | 188 | { |
189 | // client.SendInstantMessage(im); | 189 | if (im.dialog == (byte)InstantMessageDialog.InventoryOffered) |
190 | 190 | // send it directly or else the item will be given twice | |
191 | // Send through scene event manager so all modules get a chance | 191 | client.SendInstantMessage(im); |
192 | // to look at this message before it gets delivered. | 192 | else |
193 | // | 193 | { |
194 | // Needed for proper state management for stored group | 194 | // Send through scene event manager so all modules get a chance |
195 | // invitations | 195 | // to look at this message before it gets delivered. |
196 | // | 196 | // |
197 | Scene s = FindScene(client.AgentId); | 197 | // Needed for proper state management for stored group |
198 | if (s != null) | 198 | // invitations |
199 | s.EventManager.TriggerIncomingInstantMessage(im); | 199 | // |
200 | Scene s = FindScene(client.AgentId); | ||
201 | if (s != null) | ||
202 | s.EventManager.TriggerIncomingInstantMessage(im); | ||
203 | } | ||
200 | } | 204 | } |
201 | } | 205 | } |
202 | } | 206 | } |
@@ -215,7 +219,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
215 | if (!m_ForwardOfflineGroupMessages) | 219 | if (!m_ForwardOfflineGroupMessages) |
216 | { | 220 | { |
217 | if (im.dialog == (byte)InstantMessageDialog.GroupNotice || | 221 | if (im.dialog == (byte)InstantMessageDialog.GroupNotice || |
218 | im.dialog != (byte)InstantMessageDialog.GroupInvitation) | 222 | im.dialog == (byte)InstantMessageDialog.GroupInvitation) |
219 | return; | 223 | return; |
220 | } | 224 | } |
221 | 225 | ||