I don't think mIRC can prevent outgoing commands like that.
Have you tried /raw NAMES #channel
Or perhaps /parseline -otqpn NAMES #channel
While looking at /debug -e @debug
Do not you think? It's all right.
Then in mIRC options,
IRC / Options / disables the "
Nicks on join" option and then tries to execute the command /names #channel, using the latest beta version 7.54.1015.
And tell me if you can reproduce the command.