Connecting and reading/writing on IRC

Hey,
I wanted to connect to an IRC webchat (webchat.quakenet.org), join a channel and read the messages in there, to answer them later.
I already tested some libraries such as IRClib but none of them worked.
My plan was to make a text based game, running over IRC, wich reads some commands from IRC and answeres them. Just like a text-adventure.

How do I implement the connection, reading and writing?