Here I Have a windows app with two items:
RichTextBox chatbot
Button startButton
Okay, so when the start button is pressed some code runs and then it hits this loop:
for (buf = input.ReadLine(); ; buf = input.ReadLine())
{
//Display received irc message
chatbox.Text += "\n " + buf;
//Send pong reply to any ping messages
if (buf.StartsWith("PING ")) { output.Write(buf.Replace("PING", "PONG") + "\r\n"); output.Flush(); }
if (buf[0] != ':') continue;
/* IRC commands come in one of these formats:
* :NICK!USER@HOST COMMAND ARGS ... :DATA\r\n
* :SERVER COMAND ARGS ... :DATA\r\n
*/
}
Boom... Program stopped responding...
When I run this code in a console program though it all works perf. Runs good, executes good, performs as expected.
What is this code apart of (Twitch Bot I am making)