示例#1
0
 private void btnConnect_Click(object sender, EventArgs e)
 {
     config = new Config("irc.rizon.net", 6667, "rightest", "britpol");
     conn = new Connection(config);
     //readThread = new Thread(() => conn.Read(this));
     //readThread.Start();
 }
示例#2
0
        public Connection(Config cfg)
        {
            config = cfg;

            using (TcpClient client = new TcpClient("irc.rizon.net", 6667))
            using (NetworkStream stream = client.GetStream())
            using (reader = new StreamReader(stream))
            using (StreamWriter writer = new StreamWriter(stream))
            {
                writer.AutoFlush = true;

                writer.WriteLine("PASS b89eaac7e61417341b710b");
                writer.WriteLine("NICK " + "TEST");
                writer.WriteLine("USER righ 0 * :righBotGUI");
                writer.WriteLine("JOIN #britpol");

            }
        }