mIRC seems to assume that any unhandled command is meant for the server, and sends it off to the server. If it's a bad command or missing alias or something, you will either get an "Unknown Command" response from the server, or "not connected" error message if not connected.
Rather I'd have these unhandled commands treated as an error. If you want to send a unhandled command to the server, a specific command (i.e. /type maybe or is that already taken) must proceed the line.
Example: Suppose I wanted to send the command '/nickserv' to the server... i would use...
Of course not everyone would like this. So, allow scripts to enable some sort of "explicit" mode that treats unhandled commands as errors.