you can look in the source of x-GUI, I made my own mIRC code parser for custom richedits, and I had no problems with it.