alias m {
var %x = $nick($1,0,r) | while (%x) {
var %r = %r $nick($1,%x,r)
if ($numtok(%r,32) = $modespl) { mode $1 + $+ $str(v,$modespl) %r | unset %r } | dec %x
}
if (%r) { mode $1 + $+ $str(v,$numtok(%r,32)) %r }
}

I paste this into my remote, now where does the rest of the stuff go, can you please explain it a bit more detailed for someone who is new to mIRC.