seems like wims from swiftirc already has that covered ;)
http://forum.swiftirc.net/viewtopic.php?f=74&t=24548