All pastes #776650 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-11-16 05:03 UTC
rendered paste body
alias mass {
  if ($me isop $chan) ($nick ishop $chan) {
    if ($1 isin +vvoice) { set %prefix $+(+,$str(v,$modespl)) | goto start }
    if ($1 isin -vdevoice) { set %prefix $+(-,$str(v,$modespl)) }
    if ($1 isin +oop) { set %prefix $+(+,$str(o,$modespl)) | goto start }
    if ($1 isin -odeop) { set %prefix $+(-,$str(o,$modespl)) }
    if ($1 isin +qowner) { set %prefix $+(+,$str(q,$modespl)) | goto start }
    if ($1 isin -qdeowner) { set %prefix $+(-,$str(q,$modespl)) }
    if ($1 isin +aprotect) { set %prefix $+(+,$str(a,$modespl)) | goto start }
    if ($1 isin -adeprotect) { set %prefix $+(-,$str(a,$modespl)) }
    if ($1 isin +hhalfop) { set %prefix $+(+,$str(h,$modespl)) | goto start }
    if ($1 isin -hdehalfop) { set %prefix $+(-,$str(h,$modespl)) }
    if ($1 isin +eexcept) { set %prefix $+(+,$str(e,$modespl)) | goto start }
    if ($1 isin -eunexcept) { set %prefix $+(-,$str(e,$modespl)) }
    if ($1 isin +Iinvitelist) { set %prefix $+(+,$str(I,$modespl)) | goto start }
    if ($1 isin -Iinvitelist) { set %prefix $+(-,$str(I,$modespl)) }
    if ($1 isin +bban) { set %prefix $+(+,$str(b,$modespl)) | goto start }
    if ($1 isin -bunban) { set %prefix $+(-,$str(b,$modespl)) }
    :start
    set %massing $nick($chan,0)
    while (%massing) {
      if ($nick($chan,%massing) != $me) { set %mass1 %mass1 $nick($chan,%massing) }
      if ($gettok(%mass1,0,32) = $modespl) { mode $chan %prefix %mass1 | unset %mass1 }
      dec %massing
    }
    mode $chan %prefix %mass1 | unset %mass1 
  }
  else { echo -a *** Error you're not an halfop on $chan *** }
}