The ChatZilla! irc client is nice except that it lacks good documentation for its API, so scripting it is more an adventure in diving into its internals.
I have written a small telnet client, except that it does only speak raw sockets and has other shortcomings. But it was easily done and is convenient for me, because I chat over raw socket connections as well.