Provides data for events that concern an IrcUser.
Inheritance: IrcCommentEventArgs
Esempio n. 1
0
        /// <summary>
        /// Raises the <see cref="UserInvited"/> event.
        /// </summary>
        /// <param name="e">The <see cref="IrcUserEventArgs"/> instance containing the event data.</param>
        protected virtual void OnUserInvited(IrcUserEventArgs e)
        {
            var handler = this.UserInvited;

            if (handler != null)
            {
                handler(this, e);
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Raises the <see cref="ModesChanged"/> event.
        /// </summary>
        /// <param name="e">The <see cref="IrcUserEventArgs"/> instance containing the event data.</param>
        protected virtual void OnModesChanged(IrcUserEventArgs e)
        {
            var handler = this.ModesChanged;

            if (handler != null)
            {
                handler(this, e);
            }
        }
Esempio n. 3
0
        /// <summary>
        ///     Raises the <see cref="TopicChanged" /> event.
        /// </summary>
        /// <param name="e">The <see cref="IrcUserEventArgs" /> instance containing the event data.</param>
        protected virtual void OnTopicChanged(IrcUserEventArgs e)
        {
            var handler = TopicChanged;

            if (handler != null)
            {
                handler(this, e);
            }
        }
Esempio n. 4
0
 /// <summary>
 /// Raises the <see cref="UserInvited"/> event.
 /// </summary>
 /// <param name="e">The <see cref="IrcUserEventArgs"/> instance containing the event data.</param>
 protected virtual void OnUserInvited(IrcUserEventArgs e)
 {
     var handler = this.UserInvited;
     if (handler != null)
         handler(this, e);
 }
Esempio n. 5
0
 /// <summary>
 /// Raises the <see cref="TopicChanged"/> event.
 /// </summary>
 /// <param name="e">The <see cref="IrcUserEventArgs"/> instance containing the event data.</param>
 protected virtual void OnTopicChanged(IrcUserEventArgs e)
 {
     var handler = this.TopicChanged;
     if (handler != null)
         handler(this, e);
 }
Esempio n. 6
0
 /// <summary>
 /// Raises the <see cref="WhoWasReplyReceived"/> event.
 /// </summary>
 /// <param name="e">The <see cref="IrcUserEventArgs"/> instance containing the event data.</param>
 protected virtual void OnWhoWasReplyReceived(IrcUserEventArgs e)
 {
     var handler = this.WhoWasReplyReceived;
     if (handler != null)
         handler(this, e);
 }
Esempio n. 7
0
        private void clientWhoIsReplyReceived(object sender, IrcUserEventArgs e)
        {
            var sb = new StringBuilder();
              foreach (var channel in e.User.Client.Channels)
              {
            sb.Append(channel.Name + ' ');
              }
              var channels = sb.ToString();

              this.Messages.Add(new Message(e.User.NickName + " " + string.Format("[{0}@{1}]", e.User.UserName, e.User.HostName),
                        DateTime.Now.ToString(this.Settings.TimestampFormat), "=!="));
              this.Messages.Add(new Message("ircname: " + e.User.RealName,
                        DateTime.Now.ToString(this.Settings.TimestampFormat), "=!="));
              this.Messages.Add(new Message("channels: " + channels,
                        DateTime.Now.ToString(this.Settings.TimestampFormat), "=!="));
              this.Messages.Add(new Message("server: " + e.User.ServerName + string.Format("[{0}]", e.User.ServerInfo),
                        DateTime.Now.ToString(this.Settings.TimestampFormat), "=!="));
              this.Messages.Add(new Message("idle: " + e.User.IdleDuration,
                        DateTime.Now.ToString(this.Settings.TimestampFormat), "=!="));
              this.Messages.Add(new Message("End of WHOIS",
                        DateTime.Now.ToString(this.Settings.TimestampFormat), "=!="));
        }
Esempio n. 8
0
 /// <summary>
 ///     Raises the <see cref="ModesChanged" /> event.
 /// </summary>
 /// <param name="e">The <see cref="IrcUserEventArgs" /> instance containing the event data.</param>
 protected virtual void OnModesChanged(IrcUserEventArgs e)
 {
     var handler = ModesChanged;
     if (handler != null)
         handler(this, e);
 }
Esempio n. 9
0
 private void Channel_ModesChanged(object sender, IrcUserEventArgs e)
 {
 }
Esempio n. 10
0
        private void Channel_TopicChanged(object sender, IrcUserEventArgs e)
        {
            var c = (IrcChannel) sender;

            OnChannelTopicReceived(c.ToChannel());
        }
Esempio n. 11
0
        private void Channel_ModesChanged(object sender, IrcUserEventArgs e)
        {
            IrcChannel channel = sender as IrcChannel;

            if (channel != null)
            {
                Channel chan = connection.Channels.FirstOrDefault(p => p.RealName == channel.Name);

                if (chan != null)
                {
                    ConnectionUtils.UnreadChannelOnInactive(chan);
                    chan.AddHistory(HtmlWriter.Write(string.Format(MainPage.GetInfoString("ChannelModeChange"), e.User.NickName,
                        string.Concat(channel.Modes))));
                }
            }
        }
Esempio n. 12
0
        private void Client_WhoIsReplyReceived(object sender, IrcUserEventArgs e)
        {
            AHistory active = ConnectionUtils.GetActiveAHistory(connection);

            active.AddHistory(HtmlWriter.Write(string.Format(MainPage.GetInfoString("Whois"), e.User.NickName, e.User.HostName,
                e.User.RealName, e.User.IsAway, e.User.IsOnline, e.User.IsOperator, e.User.IdleDuration.ToString("c"))));
        }
Esempio n. 13
0
 private void Client_WhoWasReplyReceived(object sender, IrcUserEventArgs e)
 {
 }