That is best done on a script by script basis, rather than having one script try to check before the other scripts execute.
Generally the format you are looking for would be
on *:text:!command:#:{
if $nick($chan,$nick,a,hrv) {
;rest of code for the specified command
}
}