Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Copyright (c) 2013, Blizzeta Software and Gaming ( Adonis S. Deliannis )
- * Test Code *
- */
- using System;
- using System.Collections.Generic;
- using System.IO;
- using System.Linq;
- using System.Net;
- using System.Net.Sockets;
- using System.Text;
- namespace IRC
- {
- internal class Program
- {
- static dynamic tcp = new TcpClient();
- static dynamic writer;
- static dynamic reader;
- static dynamic cmd;
- static dynamic Server = "";
- static dynamic SelectedServer;
- static dynamic Port = 6667;
- static dynamic Channel = "#";
- static dynamic Nick = "";
- static dynamic Realname = "";
- static dynamic Username = "";
- static dynamic NickServPass = ""; // Use if you want to identify your Bot
- static dynamic Mode = 8;
- static void Main(string[] args)
- {
- tcp.Connect(Server, Port);
- while (tcp.Connected)
- {
- writer = new StreamWriter(tcp.GetStream());
- reader = new StreamReader(tcp.GetStream());
- WriteLine("NICK {0}", Nick);
- WriteLine("USER {0} {1} * : {2}", Username, Mode, Realname);
- WriteLine("JOIN {0}", Channel);
- while ((cmd = reader.ReadLine()) != null)
- {
- SelectedServer = cmd.Split(' ')[0];
- SelectedServer = SelectedServer.Trim(':');
- Console.WriteLine(cmd);
- }
- }
- Console.ReadKey(true);
- }
- static void WriteLine(string Text, params object[] Parameters)
- {
- writer.WriteLine(Text, Parameters);
- writer.Flush();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement