Provides data for events that specify a name.
Inheritance: System.EventArgs
Ejemplo n.º 1
0
        /// <summary>
        /// Raises the <see cref="Quit"/> event.
        /// </summary>
        /// <param name="e">The <see cref="IrcCommentEventArgs"/> instance containing the event data.</param>
        protected virtual void OnQuit(IrcCommentEventArgs e)
        {
            var handler = this.Quit;

            if (handler != null)
            {
                handler(this, e);
            }
        }
Ejemplo n.º 2
0
        void OnUserQuit(object sender, IrcCommentEventArgs e)
        {
            var ircUser = (IrcUser)sender;
            IrcUsers.Remove(ircUser);

            if (!String.IsNullOrEmpty(Config.IRCQuitMessageFormat))
                TShock.Utils.Broadcast(String.Format(Config.IRCQuitMessageFormat, ircUser.NickName, e.Comment), Color.Yellow);
        }
Ejemplo n.º 3
0
 /// <summary>
 ///     Raises the <see cref="Quit" /> event.
 /// </summary>
 /// <param name="e">The <see cref="IrcCommentEventArgs" /> instance containing the event data.</param>
 protected virtual void OnQuit(IrcCommentEventArgs e)
 {
     var handler = Quit;
     if (handler != null)
         handler(this, e);
 }
Ejemplo n.º 4
0
 protected override void OnLocalUserQuit(IrcLocalUser localUser, IrcCommentEventArgs e)
 {
     Console.WriteLine("Quit: {0}",e.Comment);
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Raises the <see cref="NetworkInformationReceived"/> event.
 /// </summary>
 /// <param name="e">The <see cref="IrcCommentEventArgs"/> instance containing the event data.</param>
 protected virtual void OnNetworkInformationReceived(IrcCommentEventArgs e)
 {
     var handler = this.NetworkInformationReceived;
     if (handler != null)
         handler(this, e);
 }
Ejemplo n.º 6
0
        void ircUser_Quit(object sender, IrcCommentEventArgs e)
        {
            IrcUser ircUser = (IrcUser)sender;
            INetwork connection = this.connections[ircUser.Client];
            IUser user = this.users[ircUser];

            DestroyUser(ircUser);

            Application.Current.Dispatcher.InvokeAsync(() =>
            {
                Quit quit = new Quit(connection, null, user, e.Comment);
                connection.Channels.ForEach(c => c.Log.Add(quit));
                this.client.Log.Add(quit);
            });
        }
Ejemplo n.º 7
0
 protected abstract void OnLocalUserQuit(IrcLocalUser localUser, IrcCommentEventArgs e);
Ejemplo n.º 8
0
        protected void IrcClient_LocalUser_Quit(object sender, IrcCommentEventArgs e)
        {
            var user = (IrcLocalUser) sender;

            OnLocalUserQuit(user, e);
        }
Ejemplo n.º 9
0
        private void User_Quit(object sender, IrcCommentEventArgs e)
        {
            var user = sender as IrcUser;

            foreach (IrcChannelUser cuser in user.GetChannelUsers())
                cuser.ModesChanged -= User_ModesChanged;
            GUserLeft(user, e.Comment, connection.Channels);
        }