All pastes #526442 Raw Edit

Miscellany

public text v1 · immutable
#526442 ·published 2007-05-31 20:22 UTC
rendered paste body
ON $*:TEXT:/^[!@.](status|botstatus)/Si:#:{
  IF ($nick isreg $chan) { Halt }
  var %x $chan(0),%o 0,%h 0,%v 0,%p 0,%t 0,%to 0,%th 0,%tv 0,%tr 0
  while (%x) {
    if ($me isop $chan(%x)) {
      inc %o 1
      inc %p $nick($chan(%x),0)
    }
    elseif ($me ishop $chan(%x)) {
      inc %h 1
      inc %p $nick($chan(%x),0,r)
    }
    elseif ($me isvoice $chan(%x)) {
      inc %v 1
    }
    inc %to $nick($chan(%x),0,o)
    inc %th $nick($chan(%x),0,h)
    inc %tv $nick($chan(%x),0,v)
    inc %tr $nick($chan(%x),0,r)
    inc %t $nick($chan(%x),0)
    dec %x 1
  }
  $iif($left($1,1) == !,.notice $nick ***,.msg $chan) [4Status]: 10I am currently on4 $chan(0) 10channels. Of those, I am op on4 %o 10, halfop on4 %h , 10and voice on4 %v .
}