Exemple #1
0
        void iparse_oKickEvent(object sender, KickEventArgs e)
        {
            TreeNode        thisTN = null;
            ChanMessageList cml;

            if (e.KickedNick == tbNick.Text)
            {
                foreach (TreeNode tnn in tvChans.Nodes)
                {
                    if (tnn.Text == ircCore1.ServerName)
                    {
                        thisTN = tnn;
                    }
                }
                if (ChannelList.TryGetValue(e.From, out cml))
                {
                    cml.IsJoined   = false;
                    cml.KickReason = e.KickerUser + " Kicked " + tbNick.Text + " -- " + e.Reason;
                }
                foreach (TreeNode tn2 in thisTN.Nodes)
                {
                    if (tn2.Text == e.From)
                    {
                        tn2.ForeColor = Color.LightGray;
                    }
                }
            }
        }
Exemple #2
0
 void iparse_oKickEvent(object sender, KickEventArgs e)
 {
     TreeNode thisTN = null;
     ChanMessageList cml;
     if (e.KickedNick == tbNick.Text)
     {
         foreach (TreeNode tnn in tvChans.Nodes)
         {
             if (tnn.Text == ircCore1.ServerName)
                 thisTN = tnn;
         }
         if (ChannelList.TryGetValue(e.From, out cml))
         {
             cml.IsJoined = false;
             cml.KickReason = e.KickerUser + " Kicked " + tbNick.Text + " -- " + e.Reason;
         }
         foreach (TreeNode tn2 in thisTN.Nodes)
         {
             if (tn2.Text == e.From)
             {
                 tn2.ForeColor = Color.LightGray;
             }
         }
     }
 }
Exemple #3
0
        //>> :kubrick.freenode.net 470 foxjazz #csharp ##csharp :Forwarding to another channel
        private void cmdKICK(string[] args)
        {
            string[]      source     = args[0].Split(new char[] { '!' });
            string        nick       = source[0].Replace(":", "");
            string        realname   = source[1].Split(arobas)[0];
            string        hostname   = source[1].Split(arobas)[1];
            UserInfo      user       = new UserInfo(nick, realname, hostname, false);
            string        channel    = args[2].Replace(":", "");
            string        kickednick = args[3];
            string        reason     = UtilityService.JoinString(args, 4, args.Length).Trim(new char[] { ':' });
            KickEventArgs e;

            //bool isyou = false;
            //if (kickednick == connection.UserInformation.Nick)
            //{
            //    isyou = true;
            //}
            e = new KickEventArgs(kickednick, user, reason, channel);
            oKickEvent(this, e);
        }
Exemple #4
0
 //>> :kubrick.freenode.net 470 foxjazz #csharp ##csharp :Forwarding to another channel
 private void cmdKICK(string[] args)
 {
     string[] source = args[0].Split(new char[] { '!' });
     string nick = source[0].Replace(":", "");
     string realname = source[1].Split(arobas)[0];
     string hostname = source[1].Split(arobas)[1];
     UserInfo user = new UserInfo(nick, realname, hostname, false);
     string channel = args[2].Replace(":", "");
     string kickednick = args[3];
     string reason = UtilityService.JoinString(args, 4, args.Length).Trim(new char[] { ':' });
     KickEventArgs e;
     //bool isyou = false;
     //if (kickednick == connection.UserInformation.Nick)
     //{
     //    isyou = true;
     //}
     e = new KickEventArgs(kickednick, user, reason, channel);
     oKickEvent(this, e);
 }