This is where ircpipe comes in: a simple utility that understands just enough IRC to handle those PINGs, as well as connection setup, authentication, and even joining an initial list of channels. The idea is to set up a pipe between an IRC network and stdin/stdout, which the user can then read from and write to without having to think about details.

git repository: ircpipe