예제 #1
0
        /// <summary>
        /// Changes the status for the user in the given message.
        /// Call this method when a Status Changed Message (304) is
        /// received from the server.
        /// </summary>
        /// <param name="message"></param>
        public void OnStatusChangedMessage(MessageEventArgs_304 message)
        {
            var u = GetUser(message.UserId);

            if (u != null)
            {
                u.OnStatusChangedMessage(message);
            }
        }
예제 #2
0
        /// <summary>Updates this user with the information given in the message.</summary>
        /// <param name="message"></param>
        public void OnStatusChangedMessage(MessageEventArgs_304 message)
        {
            if (message.UserId != userId)
            {
                throw new ApplicationException("The user from the given " +
                                               "message ('" + message + "') did not match the current " +
                                               "user ('" + this + "')");
            }

            userId = message.UserId;
            idle   = message.Idle;
            admin  = message.Admin;
            icon   = message.Icon;
            nick   = message.Nick;
            status = message.Status;

            Color = new NickColor(nick).RGB;

            if (Updated != null)
            {
                Updated(this);
            }
        }