aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
authorMelanie2011-10-12 01:39:38 +0100
committerMelanie2011-10-12 01:39:38 +0100
commitc0555f6be60430b7e82c3d77b6c80f684761665b (patch)
treea30f99899c595790f1a21fb4486618251af4b030 /OpenSim/Region/CoreModules
parentMerge commit '38d205502a83ed334d9827f43862579cec305639' into bigmerge (diff)
parentRemoved redundant scene presence lookups in HGMessageTransferModule (diff)
downloadopensim-SC-c0555f6be60430b7e82c3d77b6c80f684761665b.zip
opensim-SC-c0555f6be60430b7e82c3d77b6c80f684761665b.tar.gz
opensim-SC-c0555f6be60430b7e82c3d77b6c80f684761665b.tar.bz2
opensim-SC-c0555f6be60430b7e82c3d77b6c80f684761665b.tar.xz
Merge commit '3142982353a121920e571e5b33acffc065b20a2e' into bigmerge
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/InstantMessage/HGMessageTransferModule.cs25
1 files changed, 4 insertions, 21 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/HGMessageTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/HGMessageTransferModule.cs
index d294692..eb14603 100644
--- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/HGMessageTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/HGMessageTransferModule.cs
@@ -302,41 +302,24 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
302 return string.Empty; 302 return string.Empty;
303 } 303 }
304 304
305
306 /// <summary> 305 /// <summary>
307 /// Find the scene for an agent 306 /// Find the root client for a ID
308 /// </summary> 307 /// </summary>
309 private Scene GetClientScene(UUID agentId) 308 public IClientAPI LocateClientObject(UUID agentID)
310 { 309 {
311 lock (m_Scenes) 310 lock (m_Scenes)
312 { 311 {
313 foreach (Scene scene in m_Scenes) 312 foreach (Scene scene in m_Scenes)
314 { 313 {
315 ScenePresence presence = scene.GetScenePresence(agentId); 314 ScenePresence presence = scene.GetScenePresence(agentID);
316 if (presence != null && !presence.IsChildAgent) 315 if (presence != null && !presence.IsChildAgent)
317 return scene; 316 return presence.ControllingClient;
318 } 317 }
319 } 318 }
320 319
321 return null; 320 return null;
322 } 321 }
323 322
324 /// <summary>
325 /// Find the client for a ID
326 /// </summary>
327 public IClientAPI LocateClientObject(UUID agentID)
328 {
329 Scene scene = GetClientScene(agentID);
330 if (scene != null)
331 {
332 ScenePresence presence = scene.GetScenePresence(agentID);
333 if (presence != null)
334 return presence.ControllingClient;
335 }
336
337 return null;
338 }
339
340 #region IInstantMessageSimConnector 323 #region IInstantMessageSimConnector
341 public bool SendInstantMessage(GridInstantMessage im) 324 public bool SendInstantMessage(GridInstantMessage im)
342 { 325 {