Why re-inventing the wheel? IRC and XMPP are proven technologies that scale, I wouldn't go and try to build my own messaging technology: there are hard problems like presence and notifications that you don't want to solve yourself.
I don't see how these are hard problems. We needed something simple, stateful and easy to work with so we rolled our own thing. It's only a few hundred lines of code and we've extended it to work with LDAP among other things.
It looks a little something like this: http://i.imgur.com/djnd0Uk.png
It's still in it's infancy, currently working on a big update that includes a REST api and other stuff.