In mIRC, click ALT+R to open your remotes. Copy and paste this code, then click 'OK'. The command trigger is Example: /mass v, or /mass voice, or /mass -v.
I redid this with the thought of it checking if nicks have the prefix in there usermodes as opposed to checking if nick isop or isvoice (meaning if nick isvoice channel, he would have a + in his prefix). This will only work where the networks reconize this format however. You must be an op in the channel to use this.
alias mass {
$iif(!$1,return),$iif($regex($1,/^[+-]?[vhoaq]?[voice]?[hop]?[op]?[protect]?[admin]?[owner]/)) {
var %m = $iif(- isin $1,$+(-,$replace($1,voice,v,hop,h,op,o,protect,a,admin,a,owner,q)),$1), %x = 1, %pr = $replacex($1,v,+,h,%,o,@,a,&,q,~), %ticks = $ticks, %n, %t
while (%x <= $nick(#,0)) {
if ($nick(#,%x) != $me) && (%pr !isin $nick(#,%x,%m).pnick) {
%n = %n $nick(#,%x) | inc %t
if ($numtok(%n,32) == $modespl) { mode # $str(%m,$modespl) %n | %n = "" }
}
inc %x
}
if (%n) { mode # $str(%m,$modespl) %n }
echo -a Mass mode completed in $calc(($ticks - %ticks) /1000) second(s) $+ , ( $+ $iif(%t > 0,%t,0) $+ / $+ $nick(#,0) $+ ) users affected.
}
}