Exemplo n.º 1
0
        /// <summary>
        /// Gets if the Buddy is Idle. This is necessary because Buddies are not always reported as Idle for some strange AOL known reason.
        /// </summary>
        /// <param name="BuddyName">The Name of the Buddy to check.</param>
        /// <returns>Returns true if the Buddy is Idle, false else.</returns>
        public static void CheckBuddyIdle(String BuddyName)
        {
            //get the buddy list
            IAccBuddyList bl = accSess.BuddyList;

            //get the user
            IAccUser usr = bl.GetBuddyByName(BuddyName);

            //sanity check: null user
            if (usr == null)
            {
                return;
            }

            //request idle
            usr.RequestProperty(AccUserProp.AccUserProp_IdleTime);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Gets the Position of the Buddy in the specified Group.
        /// </summary>
        /// <param name="BuddyName">The Name of the Buddy to get the Position of.</param>
        /// <param name="GroupName">The Name of the Group the specified Buddy belongs to.</param>
        /// <returns>Returns the Position of the specified Buddy.</returns>
        public static int BuddyPosition(String BuddyName, String GroupName)
        {
            //get the buddy list
            IAccBuddyList bl = accSess.BuddyList;

            //get the group
            IAccGroup grp = bl.GetGroupByName(GroupName);

            //get the buddy
            IAccUser usr = bl.GetBuddyByName(BuddyName);

            //sanity check: null group
            if (grp == null)
            {
                return(-1);
            }

            //return the Buddy's position
            return(grp.GetBuddyPosition(usr));
        }