IRC is extremely idiosyncratic, though. XMPP is much more logical and consistent. Any decent language can deal with trees, although XML is sometimes a little annoying.
The potential problem with XML is the overhead. I'm not sure that's been an issue so far, though.