internal void HandleUserKicked(IrcChannelUser channelUser, string comment) { lock (((ICollection)this.usersReadOnly).SyncRoot) this.users.Remove(channelUser); OnUserKicked(new IrcChannelUserEventArgs(channelUser, comment)); }
/// <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; }
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); }
internal void HandleUserQuit(IrcChannelUser channelUser, string comment) { lock (((ICollection)this.usersReadOnly).SyncRoot) this.users.Remove(channelUser); }