Add IRC parsing stuff

I haven't worked on this in a year or so, so I'm still getting a handle
on what exactly it was I was doing. This code here was already present
but not committed. So, let's hope this is all good.