aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs18
1 files changed, 14 insertions, 4 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs
index 09a75e2..a43834c 100644
--- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs
@@ -129,6 +129,17 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
129 { 129 {
130 } 130 }
131 131
132 private Scene FindScene(UUID agentID)
133 {
134 foreach (Scene s in m_SceneList)
135 {
136 ScenePresence presence = s.GetScenePresence(agentID);
137 if (presence != null && !presence.IsChildAgent)
138 return s;
139 }
140 return null;
141 }
142
132 private IClientAPI FindClient(UUID agentID) 143 private IClientAPI FindClient(UUID agentID)
133 { 144 {
134 foreach (Scene s in m_SceneList) 145 foreach (Scene s in m_SceneList)
@@ -143,9 +154,6 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
143 private void OnNewClient(IClientAPI client) 154 private void OnNewClient(IClientAPI client)
144 { 155 {
145 client.OnRetrieveInstantMessages += RetrieveInstantMessages; 156 client.OnRetrieveInstantMessages += RetrieveInstantMessages;
146 // TODO:: Remove when mute lists are supported
147 //
148 //client.OnEconomyDataRequest += OnEconomyDataRequest;
149 } 157 }
150 158
151 private void RetrieveInstantMessages(IClientAPI client) 159 private void RetrieveInstantMessages(IClientAPI client)
@@ -169,7 +177,9 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
169 // Needed for proper state management for stored group 177 // Needed for proper state management for stored group
170 // invitations 178 // invitations
171 // 179 //
172 client.Scene.EventManager.TriggerIncomingInstantMessage(im); 180 Scene s = FindScene(client.AgentId);
181 if (s != null)
182 s.EventManager.TriggerIncomingInstantMessage(im);
173 } 183 }
174 } 184 }
175 185