OpenSim.Region.CoreModules.Avatar.Friends.FriendsModule.StatusChange C# (CSharp) Method

StatusChange() private method

Caller beware! Call this only for root agents.
private StatusChange ( UUID agentID, bool online ) : void
agentID UUID
online bool
return void
        private void StatusChange(UUID agentID, bool online)
        {
            FriendInfo[] friends = GetFriends(agentID);
            if (friends.Length > 0)
            {
                List<FriendInfo> friendList = new List<FriendInfo>();
                foreach (FriendInfo fi in friends)
                {
                    if (((fi.MyFlags & 1) != 0) && (fi.TheirFlags != -1))
                        friendList.Add(fi);
                }

                Util.FireAndForget(
                    delegate
                    {
                        foreach (FriendInfo fi in friendList)
                        {
                            //m_log.DebugFormat("[FRIENDS]: Notifying {0}", fi.PrincipalID);
                            // Notify about this user status
                            StatusNotify(fi, agentID, online);
                        }
                    }
                );
            }
        }