An IRC bot follows mainly UDP protocol. It wouldn't require so much of a tutorial as understanding basic sockets. Depending on the platform you're on, function arguments will slightly differ. The main functionality you're looking into are.
getaddrinfo: Which will allocate memory for a struct that holds information about the host server and creating the socket.
socket: Which will create the socket given the struct returned from getaddrinfo.
connect: Which will connect the socket to the server.
Once connected, all that's left to do is check the buffer supplied to recv, for specific commands.
You can send a buffer using the send function.