OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
/// <summary>
/// Try to find an active IClientAPI reference for agentID giving preference to root connections
/// </summary>
Try to find an active IClientAPI reference for agentID giving preference to root connections
Try to find an active IClientAPI reference for agentID giving preference to root connections
private IClientAPI GetActiveClient(UUID agentID)
        {
            IClientAPI child = null;
            foreach (Scene scene in m_sceneList)
            {
                ScenePresence sp = scene.GetScenePresence(agentID);
                if (sp != null)
                {
                    if (!sp.IsChildAgent)
                    {
                        return sp.ControllingClient;
                    }
                    else
                    {
                        child = sp.ControllingClient;
                    }
                }
            }
            return child;
        }
private IClientAPI GetActiveClient ( UUID agentID ) { IClientAPI child = null ; foreach ( Scene scene in m_sceneList ) { ScenePresence sp = scene . GetScenePresence ( agentID ) ; if ( sp != null ) { if ( ! sp . IsChildAgent ) { return sp . ControllingClient ; } else { child = sp . ControllingClient ; } } } return child ; }
Try to find an active IClientAPI reference for agentID giving preference to root connections
Try to find an active IClientAPI reference for agentID giving preference to root connections
// Try root avatar first // If we didn't find a root, then just return whichever child we found, or null if none
agentID
UUID