Alrighty, if you insist :)
I originally didn't want to because you'd need separate comparisons for each mode, and I wanted to keep it compact, so I found a more compact way to do it:
var %n $replacex($left($nick(%c,$me).pnick,1),~,4,&,3,@,3,%,2), %d $replacex(%y,~,3,&,3,@,2,%,2,+,1)
if (%n <= %d) {
echo -ac INFO * /massmode: You do not have the required permissions on %c
return
}
%c and %y of course already being set in the script. Editing the script with this addition.
Edit: made it even shorter. Not sure why I didn't use $nick before. >_>
var %d $replacex(%y,&,~,@,~&@,%,~&@,+,~&@%)
if (!$nick(%c,$me,%d)) {
echo -ac INFO * /massmode: You do not have the required permissions on %c
return
}