Beispiel #1
0
        /// <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;
        }
Beispiel #2
0
        /// <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;
        }
Beispiel #3
0
 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));
         }
     }
 }
Beispiel #4
0
 internal IrcChannelUserCollection(IrcChannel channel, IList <IrcChannelUser> list)
     : base(list)
 {
     this.channel = channel;
 }
Beispiel #5
0
 internal void HandleLeftChannel(IrcChannel channel)
 {
     OnLeftChannel(new IrcChannelEventArgs(channel, null));
 }
Beispiel #6
0
 internal void HandleJoinedChannel(IrcChannel channel)
 {
     OnJoinedChannel(new IrcChannelEventArgs(channel, null));
 }
Beispiel #7
0
 internal void HandleInviteReceived(IrcUser inviter, IrcChannel channel)
 {
     OnInviteReceived(new IrcChannelInvitationEventArgs(channel, inviter));
 }