There are only limited codes available for use on IRC, and they are meant for basic formatting of text.
Taken from a post on the mIRC forums.
\001 - CTCP delimeter. Used to create both CTCP messages and replies. Messages use the IRC PRIVMSG command, CTCP replies use the IRC NOTICE command.
\002 - Bold, used to start and stop bolded text.
\003 - Colour, used to start and stop colour. When starting, you must use a colour code.
\003XX,ZZ
XX = 2 or 1 digit text colour
ZZ = 2 or 1 digit background colour.
There are posts stating the colour codes too.
\009 - Tab, some clients allow tabs, while others display a block or remove it
\015 - Normal - Returns all text to normal (client default colours and decoration).
\022 - Reversed - Changes the text sot he text and background colours are revered.
EG Yellow text of green background = green text on yellow background.
This is not allways supported, and may even use clinet default colours, rather than current setting reversal.
\031 - Underline. Text is underlined.
Some clinets also support aking text italic, but I am unable to find the correct code for it.
Other clients also support the bell code (\007), though most disable it, because it can cause iritation, when users flood the channel.
Both CR (\013) and LF (\010) are out of bounds, and can't be used for formatting. IRC servers use these delimeters to mark the end of a line/command.