private void Session_SelfKicked(object sender, IrcKickEventArgs e) { if (e.Channel.Equals(this.Page.Target)) { this.Close(); } }
private void Session_SelfKicked(object sender, IrcKickEventArgs e) { var page = this.FindPage(ChatPageType.Chat, (IrcSession)sender, e.Channel); if (page != null) { this.RemovePage(page); } }
private void OnKick(IrcMessage message) { var handler = this.Kicked; var e = new IrcKickEventArgs(message); if (this.IsSelf(e.KickeeNickname)) { handler = this.SelfKicked; } this.RaiseEvent(handler, e); }
private void Session_Kicked(object sender, IrcKickEventArgs e) { if (e.IsSelfKicked) { this.Invoke(() => { var context = this.FindPage((IrcSession)sender, e.Channel); if (context != null) { this.RemovePage(context); } }); } }
private void Session_SelfKicked(object sender, IrcKickEventArgs e) { if (this.IsServer) { this.Write("Kick", e.Message.Time, string.Format("You have been kicked from {0} by {1} ({2})", e.Channel, e.Kicker.Nickname, e.Text)); } }
private void Session_Kicked(object sender, IrcKickEventArgs e) { if (!this.IsServer && this.Target.Equals(e.Channel)) { this.Write("Kick", e.Message.Time, e.Kicker == null ? string.Format("{0} has been kicked ({1}", e.KickeeNickname, e.Text) : string.Format("{0} has been kicked by {1} ({2})", e.KickeeNickname, e.Kicker.Nickname, e.Text)); _nickList.Remove(e.KickeeNickname); } }
private void Session_Kicked(object sender, IrcKickEventArgs e) { this.BeginInvoke(() => { if (e.IsSelfKicked && this.IsServer) { this.Write("Kick", string.Format("You have been kicked from {0} by {1} ({2})", e.Channel, e.Kicker.Nickname, e.Text)); } else if (!this.IsServer && this.Target.Equals(e.Channel)) { this.Write("Kick", string.Format("{0} has been kicked by {1} ({2})", e.KickeeNickname, e.Kicker.Nickname, e.Text)); this.RemoveNick(e.KickeeNickname); } }); }