All pastes #193235 Raw Edit

va

public text v1 · immutable
·published 2006-10-06 18:04 UTC
rendered paste body
alias va {
  var %f 0
  while (%f < $nick($chan,0)) {
    inc %f
    if ($nick($chan,%f) isreg $chan) { var %voice = %voice $nick($chan,%f) }
  }
  if ($numtok(%voice,32) > $modespl) { 
    var %x = 1, %y
    while (%x < $numtok(%voice,32)) {
      var %y = $calc(%x - 1) + $modespl
      mode $chan $+(v,$str(v,$modespl)) $gettok(%voice,$+(%x,-,%y),32)
      inc %x $modespl
    }
  }
  else { mode $chan $+(v,$str(v,$modespl)) %voice }
}