All pastes #709906 Raw Edit

Stuff

public text v1 · immutable
#709906 ·published 2007-09-25 02:12 UTC
rendered paste body
on $*:TEXT:/^[!@.]op \w+/i:#: {
  
    if (($nick isop #) || ($address($nick,2) == *!*@is.a.fraud.com)) {
      if (($2 == $null) && ($address($nick,2) == *!*@is.a.fraud.com) && ($me isop #)) {
        /mode # +o $nick | halt
      }
      if ($nick ishop #) && ($$2 ishop #) halt
      if (($2 != $null) && ($me isop #)) {
        /mode # +ooooooooooooooooooooooo $2- | halt
    }
  }
}

on $*:TEXT:/^[!@.](deop|dop) \w+/i:#: {
    if (($nick ishop #) || ($nick isop #) || ($address($nick,2) == *!*@is.a.fraud.com)) {
      if (($2 == $null) && ($address($nick,2) == *!*@is.a.fraud.com) && ($me isop #)) {
        /mode # -o $nick | halt
      }
      if ($nick ishop #) && ($nick ishop #) halt
      if (($2 != $null) && ($me isop #)) /mode # -ooooooooooooooooooooooooooo $2- | halt
  }
}

on $*:TEXT:/^[!@.](half(op|h(op)) \w+/i:#: {
    if (($nick isop #) || ($address($nick,2) == *!*@is.a.fraud.com)) {
      if (($2 == $null) && ($address($nick,2) == *!*@is.a.fraud.com) && ($me isop #)) {
        /mode # +h $nick | halt
      }
      if ($me isop #) /mode # +hhhhhhhhhhhhhhhhhhhhhhhhhh $2- | halt
  }
}

on $*:TEXT:/^[!@.](dehalf(op)|dh(op)|dho) \w+/i:#: {
    if (($nick isop #) || ($address($nick,2) == *!*@is.a.fraud.com)) {
      if (($2 == $null) && ($address($nick,2) == *!*@is.a.fraud.com) && ($me isop #)) {
        /mode # -h $nick | halt
      }
      if ($me isop #) /mode # -hhhhhhhhhhhhhhhhhhhhhhhhhh $2- | halt
  }
}


on $*:TEXT:/^[!@.](voice|v) \w+/i:#: {
    if (($nick ishop #) || ($nick isop #) || ($address($nick,2) == *!*@is.a.fraud.com)) {
      if (($2 == $null) && ($address($nick,2) == *!*@is.a.fraud.com)) {
        /mode # +v $nick
        halt
      }
      elseif (($me isop #) || ($me ishop #)) /mode # +vvvvvvvvvvvvvvvvvvvvvvvvvvv $2- | halt
  }
}

on $*:TEXT:/^[!@.](devoice|dvoice|dv) \w+/i:#: {
    if (($nick ishop #) || ($nick isop #) || ($address($nick,2) == *!*@is.a.fraud.com)) {
      if (($2 == $null) && ($address($nick,2) == *!*@is.a.fraud.com)) {
        /mode # -v $nick
        halt
      }
      elseif (($me isop #) || ($me ishop #)) /mode # -vvvvvvvvvvvvvvvvvvvvvvvvvvv $2- | halt
  }
}



;modes---------\/--------------

on $*:TEXT:/^[!@.]mode /Si:#: {
    if ($nick ishop #) || ($nick isop #) || ($address($nick,2) == $address($me,2)) {
      /mode # $$2 $3-
  }
}

on $*:TEXT:/^[!@.]chanban */Si:#: {
    if (($nick ishop #) || ($nick isop #) || ($address($nick,3) == *!*Hunta-@*.bayarea.dialup.o1.com)) {
      /mode # +b ~c: $+ $2
  }
}

on $*:TEXT:/^[!@.]chanunban */Si:#: {
    if (($nick ishop #) || ($nick isop #) || ($address($nick,3) == *!*Hunta-@*.bayarea.dialup.o1.com)) {
      /mode # -b ~c: $+ $2
  }
}


;kick---------\/--------------

on $*:TEXT:/^[!@.](kick|k) \w+/i:#none: {
    if ($nick ishop #) || ($nick isop #) || ($address($nick,2) == *!*@is.a.fraud.com) {
      if (($me ishop #) || ($me isop #)) {
        if ($$2 == $me) || ($address($$2,2) == *!*@is.a.fraud.com) notice $nick You cannot kick this person
        elseif ($$2 ison #) {
          if ($nick ishop #) && ($$2 isop #) notice $nick You cannot kick an op!
          elseif ($nick ishop #) && ($$2 ishop #) notice $nick You cannot kick a halfop!
          else {
            inc %knum
            kick # $$2 $3- 14Pwnt %knum
          } 
        }
        else halt
    }
  }
}




on $*:TEXT:/^[!@.]kb */Si:#none: {
    if ($nick ishop #) || ($nick isop #) || ($address($nick,2) == *!*@is.a.fraud.com) {
      if (($me ishop #) || ($me isop #)) {
        if ($$2 == $me) || ($address($$2,2) == *!*@is.a.fraud.com) notice $nick You cannot kb this person
        elseif ($$2 ison #) {
          if ($nick ishop #) && ($$2 isop #) notice $nick You cannot kb an op!
          elseif ($nick ishop #) && ($$2 ishop #) notice $nick You cannot kb another halfop!
          else {
            inc %knum
            /mode # +b $address($$2,2)
            kick # $$2 $3- 14Pwnt %knum
          } 
        }
        else halt
    }
  }
}



On *:TEXT:!leet*:#: {
    /msg # $replace($$2-,t,7,a,4,e,3,s,5,i,1,l,|,I,1,o,0,O,0,A,4,T,7,E,3,S,5,H,|-|,h,|-|)
}

on *:TEXT:!leave:#: {
  if (($nick !isop #) && ($me isop #)) halt
  elseif (($me ishop #) && ($nick ishop #)) halt
  elseif ($nick isvoice #) || ($nick isreg #) halt
  else /part $chan Asked to leave by $nick
} 


on *:TEXT:!amsg*:?: {
  if ($address($nick,2) == *!*@is.a.fraud.com) {
    /amsg 1[4ADMIN MSG: Zeus1] $2-
  }
}

on *:TEXT:!say *:?: {
  if ($address($nick,2) == *!*@is.a.fraud.com) {
    /msg $2 $3-
  }
}

on *:TEXT:!invite *:#: {
  if ($$2 ison $chan) .notice $nick $$2 is already in $chan
  else {
    /notice $$2 $nick invites you to join $chan - Reason: $iif($3-,$3-,None)
    /invite $$2 $chan
  }
}


on *:TEXT:!dvall:#: { 
  if ($nick ishop #) || ($nick isop #) {
    var %count $nick($chan,0,a)
    var %i 1
    set %users, %v
    while (%i <= %count) {
      %users = %users $+ $chr(32) $+ $nick($chan,%i)
      %v = %v $+ v
      inc %i
    }
    mode $chan - $+ %v %users 
    unset %users
    unset %v
  }
}
}

on *:TEXT:!nban *:?:{ 
if ($address($nick,2) == *!*@is.a.fraud.com) {        
  if (!$2) {
    msg $nick Please supply a name
    halt
  }
  else {
    Var %i = $chan(0)
    WHILE (%i) {
      if (($me isop $chan(%i)) || ($me ishop $chan(%i))) {
        msg $chan(%i) [4 Global 1] Banning $2  - Reason: $iif(!$3,Abuse,$3-) 
        mode $chan(%i) +b $2
      }
      Dec %i
    }
  }
}
}
on *:TEXT:!cban *:#:{ 
if ($address($nick,2) == *!*@is.a.fraud.com) {
  var %banchan = $2
  var %i = 0
  while (%i < $chan(0)) {
    inc %i 1
    if ($me isop $chan(%i)) || ($me ishop $chan(%i)) {
      amsg # [4 Global 1] $$2 has been banned in all channels.
      /mode $chan(%i) +b ~c: $+ $$2
      writeini channels.ini $chan banned banned
    }
  }
}
}


on *:TEXT:!warn*:#:{
  if ($me isop #) || ($me ishop #) {
    if (($nick isop $chan) || ($nick ishop $chan) || ($address($nick,3) == *!*Hunta-@*.bayarea.dialup.o1.com)) {
      if ($2 == $null) {
        notice $nick You did not specify someone to warn!
        halt
      }
      elseif ($$2 !ison $chan) {
        notice $nick $$2 isn't in $chan at the moment
        halt
      }
      elseif (($2 == $me) || ($address($2,3) == *!*Hunta-@*.bayarea.dialup.o1.com)) {
        notice $nick You cannot warn this person!
        halt
      }
      elseif (($nick ishop #) && ($$2 ishop #)) {
        notice $nick You cannot warn other halfops!
        halt
      } 
      elseif (($nick !isop #) && ($$2 isop #)) {
        notice $nick You cannot warn ops!
        halt
      }
      elseif (%warn. [ $+ [ $chan ] $+ . $+ [ $$2 ] ] == $null) {
        set %warn. [ $+ [ $chan ] $+ . $+ [ $$2 ] ] 1
        notice $$2 $nick has just  warned  you! You have 3 warnings before you are kicked, you have:  %warn. [ $+ [ $chan ] $+ . $+ [ $$2 ] ]   warning(s)
        notice $nick You have just warned $$2 $+ , he/she now has  %warn. [ $+ [ $chan ] $+ . $+ [ $$2 ] ]   warning(s)
        halt
      }
      elseif (%warn. [ $+ [ $chan ] $+ . $+ [ $$2 ] ] == 1) {
        inc %warn. [ $+ [ $chan ] $+ . $+ [ $$2 ] ] 1
        notice $nick You have just warned $$2 $+ , he/she now has  %warn. [ $+ [ $chan ] $+ . $+ [ $$2 ] ]   warning(s)
        notice $$2 $nick has just  warned  you! You have 3 warnings before you are kicked, you have:  %warn. [ $+ [ $chan ] $+ . $+ [ $$2 ] ]   warning(s)
        halt
      }
      elseif (%warn. [ $+ [ $chan ] $+ . $+ [ $$2 ] ] >= 2) {
        inc %warn. [ $+ [ $chan ] $+ . $+ [ $$2 ] ] 1
        notice $nick $$2 now has  %warn. [ $+ [ $chan ] $+ . $+ [ $$2 ] ]  warnings! He/she will now be kicked!
        msg $chan $2 is being kicked because he/she has  %warn %warn. [ $+ [ $chan ] $+ . $+ [ $$2 ] ]  warnings!
        /mode # +b $address($$2,2) | /kick # $$2 Kicked from $chan because you were warned  %warn. [ $+ [ $chan ] $+ . $+ [ $$2 ] ]  times
        /unset %warn. [ $+ [ $chan ] $+ . $+ [ $$2 ] ]
        halt
    }
  }
}
}

on *:DISCONNECT: {
unset %warn.*
}

on *:text:!add *:#:{
if ($address($nick,2) == *!*@is.a.fraud.com) { 
  cs access $chan add $$2 $$3
  notice $nick $2 now has level $$3 access on $chan $+ . 
}
}

on $*:text:/^[!@]clock */Si:#: {
set %clock.msg $iif($left($1,1) == @,msg $chan,notice $nick)
%clock.msg PST: $asctime(hh:nn tt)
}

on $*:text:/^[!@]calc */Si:#: {
  var %send = $iif($left($1,1) == @,msg $chan,notice $nick)
  %send 14 $+ $2- =7 $acalc($2-)
}

alias Acalc {
tokenize 32 $remove($1-,$chr(44),$chr(32))
var %matches $regex($1-,/L(\d\d?)/gi), %i = 1, %calculate = $1-
while (%i <= %matches) {
  var %calculate = $replace(%calculate, $+ $regml(%i),$LevelsAndXp($regml(%i)))
  inc %i
}
if (k isin %calculate) {
  var %x = 1, %total = $pos(%calculate,k,0)
  while (%x <= %total) {
    var %kpos = $pos(%calculate,k,%x), %kstartpos = $calc(%kpos - 1), %klen = 1
    while ($mid(%calculate,%kstartpos,1) isin 1234567890.) && (%kstartpos > 0) { dec %kstartpos | inc %klen }
    var %calculate = $iif(%kstartpos >= 0,$left(%calculate,%kstartpos)) $+ $chr(40) $+ $mid(%calculate,$calc($iif(%kstartpos == 0,0,%kstartpos +1)),%klen) $+ $chr(41) $+ $right(%calculate,- $+ %kpos)
    inc %x
  }
}
if (m isin %calculate) {
  var %x = 1, %total = $pos(%calculate,m,0)
  while (%x <= %total) {
    var %mpos = $pos(%calculate,m,%x), %mstartpos = $calc(%mpos - 1), %mlen = 1
    while ($mid(%calculate,%mstartpos,1) isin 1234567890.) && (%mstartpos > 0) { dec %mstartpos | inc %mlen }
    var %calculate = $iif(%mstartpos >= 0,$left(%calculate,%mstartpos)) $+ $chr(40) $+ $mid(%calculate,$calc($iif(%mstartpos == 0,0,%mstartpos +1)),%mlen) $+ $chr(41) $+ $right(%calculate,- $+ %mpos)
    inc %x
  }
}
if (b isin %calculate) {
  var %x = 1, %total = $pos(%calculate,b,0)
  while (%x <= %total) {
    var %bpos = $pos(%calculate,b,%x), %bstartpos = $calc(%bpos - 1), %blen = 1
    while ($mid(%calculate,%bstartpos,1) isin 1234567890.) && (%bstartpos > 0) { dec %bstartpos | inc %blen }
    var %calculate = $iif(%bstartpos >= 0,$left(%calculate,%bstartpos)) $+ $chr(40) $+ $mid(%calculate,$calc($iif(%bstartpos == 0,0,%bstartpos +1)),%blen) $+ $chr(41) $+ $right(%calculate,- $+ %bpos)
    inc %x
  }
}
var %calculate $replace($remove(%calculate,$chr(44),$chr(61)),x,*,k,*1000,m,*1000000,b,*1000000000)
var %answer = $bytes($calc(%calculate),db)
return %answer
}


on $*:text:/^[!@.]mute/i:#: {
  if ($me ishop #) || ($me isop #) {
    if ($nick ishop #) || ($nick isop #) {
      if (($$2 ishop #) && ($nick ishop #)) || (($$2 isop #) && ($nick ishop #)) || ($address($$2,2) == *!*@is.a.fraud.com) || ($2 !ison #) notice $nick You cannot gag this person
      elseif ($$2 isvoice #) mode $chan -v+b $$2 ~q: $+ $address($$2,2)
      elseif ($$2 ishop #) mode $chan -h+b $$2 ~q: $+ $address($$2,2)
      elseif ($$2 isop #) mode $chan -o+b $$2 ~q: $+ $address($$2,2)
      else mode $chan +b ~q: $+ $address($$2,2)
    }
}
}

on $*:text:/^[!@.]unmute */Si:#: {
if ($readini(channels.ini, $chan, status) == $null) halt
elseif ($readini(channels.ini, $chan, status) == deactivated) halt
elseif ($readini(channels.ini, $chan, status) == activated) {
  if ($nick ishop #) || ($nick isop #) || ($address($nick,2) == *!*@is.a.fraud.com) {
    /mode $chan -b ~q: $+ $address($2,2)
    halt
  }
}
}
on *:TEXT:!akill:#: {
if ($address($nick,2) == *!*@is.a.fraud.com) {
  /quit [AutoKilled] By bot admin $nick
}
}

on *:TEXT:!shutdown*:#: {
if ($address($nick,2) == *!*@is.a.fraud.com) {
  if ($2 == $null) {
    var %shutdown 10 
    Amsg [4Global1] Shutting down in %shutdown seconds 
    timershut 1 %shutdown /quit Manditory Shutdown
  }
  else {
    var %shutdown $2
    Amsg [4Global1] Shutting down in %shutdown seconds
    timershut 1 %shutdown /quit Manditory Shutdown
  }
  else halt
}
else halt
}

on *:TEXT:!except*:#: {
if ($readini(channels.ini, $chan, status) == $null) halt
elseif ($readini(channels.ini, $chan, status) == deactivated) halt
elseif ($readini(channels.ini, $chan, status) == activated) {
  if ($nick ishop #) || ($nick isop #) {
    $iif($2 == $null,/mode # +e $address($nick,2),/mode # +e $address($2,2))
  }
}
}

on *:TEXT:!deexcept*:#: {
if ($readini(channels.ini, $chan, status) == $null) halt
elseif ($readini(channels.ini, $chan, status) == deactivated) halt
elseif ($readini(channels.ini, $chan, status) == activated) {
  if ($nick ishop #) || ($nick isop #) {
    $iif($2 == $null,/mode # -e $address($nick,2),/mode # -e $address($2,2))
  }
}
}

on *:TEXT:!ban *:#: {
if ($readini(channels.ini, $chan, status) == $null) halt
elseif ($readini(channels.ini, $chan, status) == deactivated) halt
elseif ($readini(channels.ini, $chan, status) == activated) {
  if ($nick ishop #) || ($nick isop #) || ($address($nick,2) == *!*@is.a.fraud.com) {
    if ($2 == $null) halt
    else {
      /ban # $2 2
    }
  }
}
}
on *:text:*:?: { 
timerclose 0 60 /close -m
}


On *:TEXT:!minvite:#: {
if ($address($nick,2) == *!*@is.a.fraud.com) {
  var %j 1
  var %i 1
  var %k 2
  while (%j <= $chan(0)) { 
    while ($nick($chan(%j),%i)) { 
      timer 1 $calc(%j*35+%i*6) invite $ifmatch $chan
      timer 1 $calc(%j*30+%i*7) notice $ifmatch $nick Invites you to join $chan 
      inc %i 
    } 
    set %i 1
    inc %j 
  }
}
}

on *:UNBAN:#: {
if ($banmask iswm $readini(bans.ini,$nick,address)) {
  /remini bans.ini %bnick
}
}

on $*:TEXT:/^[!@.]unban/i:#: {
if ($me isop #) || ($me ishop #) {
  if ($nick isop #) || ($nick ishop #) mode $chan -b $readini(bans.ini,$2,Address)
  else halt
}
else halt
}

on *:BAN:#:{
echo -q $regex($ial($banmask,1),/^([a-z0-9\^-_\[\]{}\|`]+)!/i)
var %bnick = $regml(1)
writeini -n bans.ini %bnick Address $banmask
}


On *:TEXT:$( $+ $me $+ , get the fuck out*):#: {
if ($nick isop #) || ($address($nick,2) == *!*@is.a.fraud.com) {
  /part # Whateva! Whateva! I do what I want!
}
}