Beispiel #1
0
        public void ChangeMyUserStatus(bool?isAway = null, bool?isInGame = null)
        {
            User u;

            if (MyUser != null)
            {
                u = MyUser.Clone();
            }
            else
            {
                u = new User();
            }
            u.FromInt(lastUserStatus);
            if (isAway != null)
            {
                u.IsAway = isAway.Value;
            }
            if (isInGame != null)
            {
                u.IsInGame = isInGame.Value;
            }
            if (MyUser == null || lastUserStatus != u.ToInt())
            {
                con.SendCommand("MYSTATUS", u.ToInt());
                lastUserStatus = u.ToInt();
            }
        }