This is what the parseline feature is for. It returns the line exactly as it is before it is sent to the server. mIRC sends all lines to the server ending in a $lf. As a scripter, you will need to cater for how parseline works in order to use it.