That's a good point. Another suggestion besides (or in addition to) a $cmdprefix identifier would be some kind of
$command identifier for the ON INPUT event specifically. This would return whether or not mIRC is about to process the line as a /command, abstracting the common
ON *:INPUT:*:if (/* !iswm $1- || $ctrlenter) ...
to:
ON *:INPUT:*:if (!$command) ...