Twisted Words provides implementations of a handful of IM protocols, including IRC, MSNP8, OSCAR, TOC, and Jabber. It also comes with a multi-protocol server built around a few simple interfaces, the goal of which is to facilitate implementations of novel servers, clients, and bots. Out of the box, it comes with server that accepts connections over IRC and PB and seeks out installed third-party plugins to support other interfaces (for example, a Nevow LivePage-based Web interface).
sim (simple instant messaging) is an IRC client specialized for use with bitlbee. It is based on sic (http://suckless.org). It reads commands from standard input and prints all server output to standard output. It also multiplexes all channel traffic into one output, so you don't have to switch to different channel buffers. sim must be customized by editing its source code to insert the correct username, server, password, and identification information.