Example #1
0
        public void OnUserQuitIRC(string userName)
        {
            if (users.Remove(userName))
            {
                if (notifyOnUserListChange && users.Find(userName) != null)
                {
                    AddMessage(new ChatMessage(userName + " has quit from CnCNet."));
                }

                UserQuitIRC?.Invoke(this, new UserNameEventArgs(userName));
            }
        }
Example #2
0
        public void OnUserQuitIRC(string userName)
        {
            int index = users.FindIndex(u => u.IRCUser.Name == userName);

            if (index == -1)
            {
                return;
            }

            if (notifyOnUserListChange)
            {
                AddMessage(new ChatMessage(userName + " has quit from CnCNet."));
            }

            users.RemoveAt(index);
            UserQuitIRC?.Invoke(this, new UserNameIndexEventArgs(index, userName));
        }