Provides data for events that concern an IrcUser.
Inheritance: IrcCommentEventArgs
示例#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);
            }
        }
示例#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);
            }
        }
示例#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);
            }
        }
示例#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);
 }
示例#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);
 }
示例#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);
 }
示例#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), "=!="));
        }
示例#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);
 }
示例#9
0
 private void Channel_ModesChanged(object sender, IrcUserEventArgs e)
 {
 }
示例#10
0
        private void Channel_TopicChanged(object sender, IrcUserEventArgs e)
        {
            var c = (IrcChannel) sender;

            OnChannelTopicReceived(c.ToChannel());
        }
示例#11
0
文件: Command.cs 项目: charla-n/BIRC
        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))));
                }
            }
        }
示例#12
0
文件: Command.cs 项目: charla-n/BIRC
        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"))));
        }
示例#13
0
文件: Command.cs 项目: charla-n/BIRC
 private void Client_WhoWasReplyReceived(object sender, IrcUserEventArgs e)
 {
 }