I am making IRC chat client and I am wanting to grab the user list or simply the user count, how can I go about doing this. This is the method I'm using to connect to the IRC:
Private Sub IRCConnect()
Dim stream As NetworkStream
Dim irc As TcpClient
Dim reader As StreamReader
Try
irc = New TcpClient(SERVER, PORT)
stream = irc.GetStream()
reader = New StreamReader(stream)
writer = New StreamWriter(stream)
' Start PingSender thread
Dim ping As New PingSender
ping.Start()
writer.WriteLine(USER)
writer.Flush()
writer.WriteLine("NICK " & Config.Nickname)
writer.Flush()
writer.WriteLine("JOIN " & Config.Channel & " " & Config.ChanPass)
writer.Flush()
txtView.Text = txtView.Text & ">Connected successfully." & vbNewLine
HighlightPhrase(txtView, "Connected successfully.", Color.Lime)
Thread.Sleep(2000)
Catch Ex As Exception
' Show the exception, sleep for a while and try to establish a new connection to irc server
txtView.Text = txtView.Text & ">ERROR: Unexpected error occured: " & Ex.ToString & vbNewLine
HighlightPhrase(txtView, "Unexpected error occured: " & Ex.ToString, Color.Red)
End Try
End Sub
I have no idea where to start, any help would be much appreciated.