I think this used to be a good starting point:
https://forum.swiftirc.net/viewtopic.php?f=36&t=16859