using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { string data = ":irc.rizon.net PRIVMSG kishi :!say #SteelGolem hello alll"; string[] ex = data.Split(' '); string command = ex[3]; switch (command) { case ":!say": string channel = ex[4]; int start_of_message = data.IndexOf(channel) + channel.Length + 1; if (start_of_message < data.Length) SendData("PRIVMSG ", data.Substring(start_of_message)); break; } } static void SendData(string command, string what) { Console.WriteLine(command + " > " + what); Console.ReadKey(false); } } }