/// <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); } }
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); }
/// <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); }
protected override void OnLocalUserQuit(IrcLocalUser localUser, IrcCommentEventArgs e) { Console.WriteLine("Quit: {0}",e.Comment); }
/// <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); }
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); }); }
protected abstract void OnLocalUserQuit(IrcLocalUser localUser, IrcCommentEventArgs e);
protected void IrcClient_LocalUser_Quit(object sender, IrcCommentEventArgs e) { var user = (IrcLocalUser) sender; OnLocalUserQuit(user, e); }
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); }