Make use of /echo's -t, -m, -i, and -l switches to get rid of $timestamp and to make mIRC handle and display them more like its default text.
Make use of $nick()'s pnick property to save many lines and all the separate is* checks and echoes.
On input, don't only make sure that the text doesn't begin with a / command prefix but also have it make an exception if $ctrlenter or $inpaste is true. And why would you check for $chan if the event is only triggered on channels the way it is right now anyway?
And most importantly, why not use mIRC's 'Nick Colors' option and apply the settings to 'Message and Listbox' or 'Message' only?
:)