예제 #1
0
		private void Session_SelfKicked(object sender, IrcKickEventArgs e)
		{
			if (e.Channel.Equals(this.Page.Target))
			{
				this.Close();
			}
		}
예제 #2
0
		private void Session_SelfKicked(object sender, IrcKickEventArgs e)
		{
			var page = this.FindPage(ChatPageType.Chat, (IrcSession)sender, e.Channel);
			if (page != null)
			{
				this.RemovePage(page);
			}
		}
예제 #3
0
        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);
        }
예제 #4
0
 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);
             }
         });
     }
 }
예제 #5
0
 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));
     }
 }
예제 #6
0
 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);
     }
 }
예제 #7
0
 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);
             }
         });
 }