Getting User Count From IRC

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.

Answers


The IRC-protocol is defined in RFC2812: http://tools.ietf.org/html/rfc2812

Send the "NAMES #currentchannel" - command ( http://tools.ietf.org/html/rfc2812#section-3.2.5 ) and you will receive a list of all visible users. This list can be counted and voilĂ  - there you got your user-count


Start by reading the the specification for IRC, it is RFC 2812.

You'll want to use the NAMES message. Here is the appropriate section from the RFC.


Need Your Help

Simulate click Geckofx vb,net

vb.net onclick geckofx

I have a winform which loads flashscore.com in a geckofx browser. i Have added a button which i want to simulate a click in the page. I want to click the calendar which you select the date. This ev...

xcode UIWebView loader code HTML

iphone xcode ios5 uiwebview

I've a question about load inside the web view: