using System;
using System.Collections.Generic;
using System.Text;
using System.Net.Sockets;
namespace iSM
{
class Program
{
static void Main(string[] args)
{
bool bClose = false;
TcpClient tcpClient = new TcpClient();
tcpClient.Connect("
irc.ham.de.euirc.net", 6667);
SendText(ref tcpClient, "USER bla bla :blubb");
SendText(ref tcpClient, "NICK irgendwas");
while (!bClose)
{
string bla = Console.ReadLine();
switch (bla.Split(' ')[1])
{
case "RAW":
string prm = bla.Substring(bla.IndexOf(' '), bla.Length);
SendText(ref tcpClient, prm);
break;
}
}
}
static void SendText(ref TcpClient tcpClient, string Text)
{
if (tcpClient != null)
tcpClient.Client.Send(System.Text.ASCIIEncoding.Default.GetBytes(Text+"\r\n"));
}
}
}