/// <summary>
        /// Sets the users of the <see cref="IrcChannel"/> using a sequence of nicknames from a NAMES reply.
        /// </summary>
        internal void SetUsers(IEnumerable <string> prefixedNicknames)
        {
            // The trick here is that since IrcUserChannelModePairs implement INotifyPropertyChanged,
            // the existing ones have to be kept because someone may listen to their events
            // and obviously expect that if an user is still there, the objects representing them won't change.

            var pairs = new List <IrcUserChannelModePair>();

            foreach (string nick in prefixedNicknames)
            {
                var split = IrcChannel.SplitName(nick, this.Network.Parameters);
                var user  = this.Network.GetUser(split.Name);
                var mode  = IrcChannel.GetUserMode(split.Modifier, this.Network.Parameters);
                var pair  = this.UserModes.FirstOrDefault(p => p.User == user);

                if (pair == null)
                {
                    pair = new IrcUserChannelModePair(user, mode);
                }
                else
                {
                    pair.Mode = mode;
                }

                pairs.Add(pair);

                if (!user.Channels.Contains(this))
                {
                    user.ChannelsInternal.Add(this);
                }
            }

            this.UserModes.SetItems(pairs);
        }
            public static void WhoIsChannel(IrcClient client, IrcMessage message)
            {
                var user = client.Network.GetUser(message.CommandArguments[1]);

                foreach (string chanName in message.Content.Split(IrcUtils.MessagePartsSeparatorArray, StringSplitOptions.RemoveEmptyEntries))
                {
                    var pair = IrcChannel.GuessChannelName(chanName, client.Network.Parameters);

                    var channel = client.Network.GetChannel(pair.Name);
                    if (!channel.Users.Contains(user))
                    {
                        channel.AddUser(user);
                    }
                    channel.UserModes[user] = IrcChannel.GetUserMode(pair.Modifier, client.Network.Parameters);

                    client._tempInfo.WhoIsReplies[user].ChannelsInternal.Add(channel);
                }
            }