aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs')
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs15
1 files changed, 7 insertions, 8 deletions
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs
index a12e6ea..10b83e6 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs
@@ -504,19 +504,18 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
504 // Try root avatar first 504 // Try root avatar first
505 foreach (Scene scene in m_sceneList) 505 foreach (Scene scene in m_sceneList)
506 { 506 {
507 if (scene.Entities.ContainsKey(agentID) && 507 ScenePresence sp = scene.GetScenePresence(agentID);
508 scene.Entities[agentID] is ScenePresence) 508 if (sp != null)
509 { 509 {
510 ScenePresence user = (ScenePresence)scene.Entities[agentID]; 510 if (!sp.IsChildAgent)
511 if (!user.IsChildAgent)
512 { 511 {
513 if (m_debugEnabled) m_log.WarnFormat("[GROUPS-MESSAGING]: Found root agent for client : {0}", user.ControllingClient.Name); 512 if (m_debugEnabled) m_log.WarnFormat("[GROUPS-MESSAGING]: Found root agent for client : {0}", sp.ControllingClient.Name);
514 return user.ControllingClient; 513 return sp.ControllingClient;
515 } 514 }
516 else 515 else
517 { 516 {
518 if (m_debugEnabled) m_log.WarnFormat("[GROUPS-MESSAGING]: Found child agent for client : {0}", user.ControllingClient.Name); 517 if (m_debugEnabled) m_log.WarnFormat("[GROUPS-MESSAGING]: Found child agent for client : {0}", sp.ControllingClient.Name);
519 child = user.ControllingClient; 518 child = sp.ControllingClient;
520 } 519 }
521 } 520 }
522 } 521 }