Please use the Code Tags when posting code.
Scripts don't recognize information sent that is coloured, bolded, etc. The easy way to handle this is to use /strip +burc
That will strip the Bold, Underline, Reverse, & Colours from text entered.
When people use the /me command, that changes it from a TEXT to a NOTICE. Just duplicate your code, changing the ON TEXT event to ON NOTICE. Fortunately the only change required is that of changing the word TEXT to NOTICE.