All pastes #437615 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-04-13 03:46 UTC
rendered paste body
using System;
using System.Collections.Generic;
using System.Text;
using Meebey.SmartIrc4net;
using System.Threading;
using System.Windows.Forms;

namespace IRC_Client
{
    class ircWindow
    {
        Form1 chat = new Form1();
        IrcClient ircC = new IrcClient();
        public bool isConnected = false;
        public string channel = Properties.Settings.Default.channel;
        public string nick = Properties.Settings.Default.Nick;
        private int port = Properties.Settings.Default.port;
        public string realName = Properties.Settings.Default.RealName;
        public string server = Properties.Settings.Default.Server;

        public void login()
        {
            ircC.Connect(server, 6667);
            isConnected = true;
            ircC.Login(nick, realName);
            new Thread(new ThreadStart(ircC.Listen)).Start();
        }

        public void logout()
        {            
            isConnected = false;
            ircC.Disconnect();
        }
        private void updateChat(object seder, IrcEventArgs e)
        {
            MessageBox.Show("Received: " + e.Data.RawMessage);
        }
        public void ReadCommands()
        {
            while (true)
            {
                ircC.WriteLine(System.Console.ReadLine());
                chat.rtb_Chan.AppendText("Test");
            }
        }

    }
}