All pastes #443787 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-04-17 00:12 UTC
rendered paste body
   1.
      on ^*:KICK:#: { haltdef | if ($knick != $me) { echo -st $chan $chr(3) $+ $color(kick) * $knick ( $+ $address($knick,2) $+ ) was kicked from $chan by $nick ( $+ $address($nick,2) $+ ) ( $+ $1- $+ ) } | else { echo -ts $chr(3) $+ $color(kick) $+ * You were kicked from $chan by $nick ( $+ $address($nick,2) $+ ) ( $+ $1- $+ ) } }
   2.
       
   3.
      on *:load:{
   4.
        /set %notesname general+general2+general3+general4+general5
   5.
      }
   6.
      alias addwarnotes {
   7.
        set %_ %notesname
   8.
        while ($numtok(%_,43) > 0) {
   9.
          puthelp cs note # $gettok(%_,1,43) 8,4rogle runs th1s sh0w..
  10.
       
  11.
          set -u0 %_ $gettok(%_,2-,43)
  12.
        }
  13.
      }
  14.
       
  15.
      alias addbanzor {
  16.
        set %_ $replace($snicks,$chr(44),$chr(32))
  17.
        while ($numtok(%_,32) > 0) {
  18.
          /cs addban # $gettok(%_,1,32) 8,4rogle runs th1s sh0w..
  19.
       
  20.
          set -u0 %_ $gettok(%_,2-,32)
  21.
        }
  22.
      }
  23.
       
  24.
      alias thekicker {
  25.
        set %_ %kickbans
  26.
        while ($numtok(%_,43) > 0) {
  27.
          puthelp cs addban # $gettok(%_,1,43) 8,4rogle runs th1s sh0w..
  28.
          set -u0 %_ $gettok(%_,2-,43)
  29.
        }
  30.
      }
  31.
       
  32.
      alias kickops {
  33.
        var %tocount $nick(#,0,o)
  34.
        var %i 1
  35.
        while (%i <= %tocount ) {
  36.
          if ( $nick(#,%i,o) != $me ) {
  37.
            /cs addban # $nick(#,%i,o) 8,4rogle runs th1s sh0w..
  38.
       
  39.
          }
  40.
          inc %i   
  41.
        }
  42.
      }
  43.
       
  44.
       
  45.
      alias kickvoice {
  46.
        var %tocount $nick(#,0,v)
  47.
        var %i 1
  48.
        while (%i <= %tocount ) {
  49.
          if ( $nick(#,%i,v) != $me ) {
  50.
            /cs addban # $nick(#,%i,v) 8,4rogle runs th1s sh0w..
  51.
       
  52.
          }
  53.
          inc %i
  54.
        }
  55.
      }
  56.
       
  57.
      alias kickall {
  58.
        var %tocount $nick(#,0,a)
  59.
        var %i 1
  60.
        while (%i <= %tocount ) {
  61.
          if ( $nick(#,%i,a) != $me ) {
  62.
            /cs addban # $nick(#,%i,a) 8,4Srogle runs th1s sh0w..
  63.
       
  64.
          }
  65.
          inc %i
  66.
        }
  67.
      }
  68.
       
  69.
      alias kickallo {
  70.
        var %tocount $nick(#,0,a,o)
  71.
        var %i 1
  72.
        while (%i <= %tocount ) {
  73.
          if ( $nick(#,%i,a,o) != $me ) {
  74.
            /cs addban # $nick(#,%i,a,o) 8,4rogle runs th1s sh0w..
  75.
       
  76.
          }
  77.
          inc %i
  78.
        }
  79.
      }
  80.
      menu nicklist,channel {
  81.
        .Take Over
  82.
        ..Addban:addbanzor
  83.
        ..Usual addbans:/thekicker
  84.
        ..Lock Channel:/mode # +intsmlk 1 $rand(1,45461321) | /topic # 8,4w4r -- w4r c0rpz run this show. | /cs topic # 8,4 w4r runs this show. -> xxx
  85.
       
  86.
        ..Info Spam:/addwarnotes
  87.
        ..Addbans
  88.
        ...Addban Everyone From #:/kickall
  89.
        ...Addban @Ps From #:/kickops
  90.
        ...Addban Peons(+v) From #:/kickvoice
  91.
        ...Addban Everyone(No @ps) From #:/kickallo
  92.
       
  93.
      }
  94.
      alias puthelp {
  95.
        if ($hget(queue) == $null) hmake queue
  96.
        hinc queue max
  97.
        var %x = a $+ $hget(queue,max)
  98.
        hadd queue %x $1-
  99.
        if ($timer(queue) == $null) { .timerqueue -m 0 1000 sendqueue }
 100.
      }
 101.
      alias hinc { if ($hget($1)) { hadd $1 $2 $calc($hget($1,$2) + $iif($3 isnum,$3,1)) } }
 102.
      alias hdec { if ($hget($1)) { hadd $1 $2 $calc($hget($1,$2) - $iif($3 isnum,$3,1)) } }
 103.
      alias sendqueue {
 104.
        if ($hget(queue,a1) == $null) || ($hget(queue,max) <= 0) { .timerqueue off | return }
 105.
        var %comm = $hget(queue,a1)
 106.
        if ($left(%comm,2) == //) {
 107.
          .timer 1 0 %comm
 108.
        }
 109.
        if ($left(%comm,2) != //) {
 110.
          %comm
 111.
        }
 112.
        var %start = 2
 113.
        var %end = $hget(queue,max)
 114.
        while (%start <= %end) {
 115.
          var %cur = a $+ $calc(%start - 1)
 116.
          var %las = a $+ %start
 117.
          if ($hget(queue,%las)) hadd queue %cur $hget(queue,%las)
 118.
          inc %start
 119.
        }
 120.
        var %las = a $+ $hget(queue,max)
 121.
        hdel queue %las
 122.
        hadd queue max $calc($hget(queue,max) - 1)
 123.
      }