/// <inheritdoc/> /// <summary> /// Initializes a new instance of the <see cref="IrcChannelEventArgs"/> class. /// </summary> /// <param name="channel">The channel that the event concerns.</param> public IrcChannelEventArgs(IrcChannel channel, string comment = null) : base(comment) { if (channel == null) { throw new ArgumentNullException("channel"); } this.Channel = channel; }
/// <summary> /// Initializes a new instance of the <see cref="IrcChannelInvitationEventArgs"/> class. /// </summary> /// <param name="channel">The channel to which the recipient user is invited.</param> /// <param name="inviter">The user inviting the recipient user to the channel.</param> public IrcChannelInvitationEventArgs(IrcChannel channel, IrcUser inviter) : base(channel) { if (inviter == null) { throw new ArgumentNullException("inviter"); } this.Inviter = inviter; }
protected override void OnChannelModeChanged(IrcChannel channel, IrcUser source, string newModes, IEnumerable <string> newModeParameters) { // Twitch doesn't actually send JOIN messages. This means we need to add users // to the channel when changing their mode if we haven't already. foreach (string username in newModeParameters) { IrcUser user = GetUserFromNickName(username); if (channel.GetChannelUser(user) == null) { channel.HandleUserJoined(new IrcChannelUser(user)); } } }
internal IrcChannelUserCollection(IrcChannel channel, IList <IrcChannelUser> list) : base(list) { this.channel = channel; }
internal void HandleLeftChannel(IrcChannel channel) { OnLeftChannel(new IrcChannelEventArgs(channel, null)); }
internal void HandleJoinedChannel(IrcChannel channel) { OnJoinedChannel(new IrcChannelEventArgs(channel, null)); }
internal void HandleInviteReceived(IrcUser inviter, IrcChannel channel) { OnInviteReceived(new IrcChannelInvitationEventArgs(channel, inviter)); }