Sending the CAP command is the method of finding out if the server supports CAP. I think the best solution is that mIRC blocks the error message stating the CAP command is invalid.

Currently I'm using RAW:*: to block the CAP command error.