Share Pastebin
Guest
Public paste!

DJ-MiguelX

By: a guest | Mar 21st, 2010 | Syntax: None | Size: 2.51 KB | Hits: 28 | Expires: Never
Copy text to clipboard
  1. alias .sbpower {
  2.   /say I'm on $rchans channels, across $rnets networks. I have %olinecount olines, $rowners owners, $radmins admins, $rops ops, $rhops halfops, and $rvoice voices. I have abusive power over $rpower people.
  3. }
  4. alias rchans {
  5.   set %total 0
  6.   set %counter 1
  7.   while (%counter <= $scon(0)) {
  8.     /scon %counter
  9.     /set %chans $chan(0)
  10.     set %total $calc(%total + %chans)
  11.     inc %counter
  12.   }
  13.   return %total
  14. }
  15. alias rops {
  16.   set %ops 0
  17.   set %counter 1
  18.   while (%counter <= $scon(0)) {
  19.     /scon %counter
  20.     set %scounter 1
  21.     while (%scounter <= $chan(0)) {
  22.       if ($me isop $chan(%scounter)) inc %ops
  23.       inc %scounter
  24.     }
  25.     inc %counter
  26.   }
  27.   return %ops
  28. }
  29. alias rpower {
  30.   set %peeps 0
  31.   set %counter 1
  32.   while (%counter <= $scon(0)) {
  33.     /scon %counter
  34.     set %scounter 1
  35.     while (%scounter <= $chan(0)) {
  36.       if ($me isop $chan(%scounter)) set %peeps $calc(%peeps + $nick($chan(%scounter),0) - 1)
  37.       if ($me ishop $chan(%scounter)) set %peeps $calc(%peeps + $nick($chan(%scounter),0) - 1)
  38.       inc %scounter
  39.     }
  40.     inc %counter
  41.   }
  42.   return %peeps
  43. }
  44. alias rowners {
  45.   set %owners 0
  46.   set %counter 1
  47.   while (%counter <= $scon(0)) {
  48.     /scon %counter
  49.     set %scounter 1
  50.     while (%scounter <= $chan(0)) {
  51.       if ($nick($chan(%scounter),$me,q)) inc %owners
  52.       inc %scounter
  53.     }
  54.     inc %counter
  55.   }
  56.   return %owners
  57. }
  58. alias radmins {
  59.   set %admins 0
  60.   set %counter 1
  61.   while (%counter <= $scon(0)) {
  62.     scon %counter
  63.     set %scounter 1
  64.     while (%scounter <= $chan(0)) {
  65.       if ($nick($chan(%scounter),$me,a) == 1) { inc %admins 1 }
  66.       inc %scounter
  67.     }
  68.     inc %counter
  69.   }
  70.   return %admins
  71. }
  72. alias rhops {
  73.   set %hops 0
  74.   set %counter 1
  75.   while (%counter <= $scon(0)) {
  76.     /scon %counter
  77.     set %scounter 1
  78.     while (%scounter <= $chan(0)) {
  79.       if ($me ishop $chan(%scounter)) inc %hops
  80.       inc %scounter
  81.     }
  82.     inc %counter
  83.   }
  84.   return %hops
  85. }
  86. alias rvoice {
  87.   set %voice 0
  88.   set %counter 1
  89.   while (%counter <= $scon(0)) {
  90.     /scon %counter
  91.     set %scounter 1
  92.     while (%scounter <= $chan(0)) {
  93.       if ($me isvoice $chan(%scounter)) inc %voice
  94.       inc %scounter
  95.     }
  96.     inc %counter
  97.   }
  98.   return %voice
  99. }
  100. alias rnets {
  101.   return $scon(0)
  102. }
  103. raw 381:*:{
  104.   set %curbragwork ¬ $+ $network $+ ¬
  105.   if (%curbragwork !isin %countednets) {
  106.     set %countednets %countednets $+ %curbragwork
  107.     inc %olinecount
  108.   }
  109. }
  110. on *:start: { unset %countednets | set %olinecount 0 }