All pastes #2103683 Raw Edit

Something

public text v1 · immutable
#2103683 ·published 2012-01-16 21:17 UTC
rendered paste body
on *:INPUT:*:{
  if ($left($strip($1,burc),1) == + || $left($strip($1,burc),1) == -) && ($mid($strip($1,burc),2,1) isin $nickmode || $mid($strip($1,burc),2,1) isin $chanmodes) {
    haltdef
    say $1-
    var %l = $calc($len($1)-1) 
    var %x 2, %z $2
    while (%z) {
      if (%z ison #) { mode # $strip($1,burc) $str(%z $chr(32),%l) }
      else {
        var %n = $nick(#,0)
        while (%n) {
          if ($replace(%z,[,<,],>,$chr(92),?) isin $replace($nick(#,%n),[,<,],>,$chr(92),?)) {
            mode # $strip($1,burc) $str($nick(#,%n) $chr(32),%l)
            var %n 1
          }
          dec %n
        }
      }
      inc %x
      var %z $ [ $+ [ %x ] ]
    }
  }
}