I'd like to code a program to just connect to an IRC channel and get the userlist. maybe something like a very tiny version of mIRC. but for now, just getting the userlist is enough for me. I google this, but I just come across IRC commands or so. Can someone please guide me to some tutorial?
I'd recommend looking at scripting in the irssi client. Generally better to go with a client already made, rather than spending time fiddling with things that aren't of value to your purpose.
Alternatively, IRSSI is on some open source license (I believe GPL), so you could look at their tarball for inspiration if you really wanted to go though the networking hassle yourself.
That should be quite simple. You get a tcp socket to the server, say Hi and ask for the users in the specific room. Just read some documentation on the IRC protocol - you basically just send the commands in ascii.