IRC requires a CR / LF pair, while the default behavior for StreamWriter is only line channels. You should create your StreamWriter as follows:
writer = new StreamWriter(stream) { NewLine = "\r\n", AutoFlush = true };
In addition, you should probably specify the username with the USER command before joining the channel, although I'm not sure if it is completely necessary:
writer.WriteLine("USER username +mode * :Real Name");
Mikep
source share