Example #1
0
        internal void HandleUserKicked(IrcChannelUser channelUser, string comment)
        {
            lock (((ICollection)this.usersReadOnly).SyncRoot)
                this.users.Remove(channelUser);

            OnUserKicked(new IrcChannelUserEventArgs(channelUser, comment));
        }
Example #2
0
        /// <inheritdoc/>
        /// <summary>
        /// Initializes a new instance of the <see cref="IrcChannelUserEventArgs"/> class.
        /// </summary>
        /// <param name="channelUser">The channel user that the event concerns.</param>
        public IrcChannelUserEventArgs(IrcChannelUser channelUser, string comment = null)
            : base(comment)
        {
            if (channelUser == null)
            {
                throw new ArgumentNullException("channelUser");
            }

            this.ChannelUser = channelUser;
        }
Example #3
0
        internal void HandleUserNameReply(IrcChannelUser channelUser)
        {
            lock (((ICollection)this.modesReadOnly).SyncRoot)
            {
                if (this.users.Contains(channelUser))
                {
#if SILVERLIGHT
                    Debug.Assert(false, "User already in channel.");
#else
                    Debug.Fail("User already in channel.");
#endif
                    return;
                }
            }

            channelUser.Channel = this;
            lock (((ICollection)this.usersReadOnly).SyncRoot)
                this.users.Add(channelUser);
        }
Example #4
0
 internal void HandleUserQuit(IrcChannelUser channelUser, string comment)
 {
     lock (((ICollection)this.usersReadOnly).SyncRoot)
         this.users.Remove(channelUser);
 }