Jump to content

Archived

This topic is now archived and is closed to further replies.

chain

Protection Script Z31

Recommended Posts

  • Administrators

Protection Script Z31

 

 

>;Protection Script Z31;Made for mIRC Script Z31 ;By Neo Nemesis;Version 1.1 on *:LOAD: {  writeini z31.ini main protect on,on,on,on,on,on,2,5,on  echo -a  $+ $color(info) $+ * Protection Script Z31 Loaded successfuly! Use /protection for the options menu!} menu channel,nicklist,query,status {  Protection Script Z31:/protection} alias protection {  if (!$1) { dialog -m protect protect }  if ($1 == op) {     if ($2) { writeini z31.ini Main Protect $puttok($protect.file,$2,1,44) }    elseif (!$2) { return $gettok($protect.file,1,44) }  }  if ($1 == kick) {    if ($2) { writeini z31.ini Main Protect $puttok($protect.file,$2,2,44) }    elseif (!$2) { return $gettok($protect.file,2,44) }  }  if ($1 == ban) {    if ($2) { writeini z31.ini Main Protect $puttok($protect.file,$2,3,44) }    elseif (!$2) { return $gettok($protect.file,3,44) }  }  if ($1 == massjoin) {    if ($2) { writeini z31.ini Main Protect $puttok($protect.file,$2,4,44) }    elseif (!$2) { return $gettok($protect.file,4,44) }  }  if ($1 == flood) {    if ($2) { writeini z31.ini Main Protect $puttok($protect.file,$2,5,44) }    elseif (!$2) { return $gettok($protect.file,5,44) }  }  if ($1 == iflood) {    if ($2) { writeini z31.ini Main Protect $puttok($protect.file,$2,6,44) }    elseif (!$2) { return $gettok($protect.file,6,44) }  }  if ($1 == timer) {    if ($2) { writeini z31.ini Main Protect $puttok($protect.file,$2,7,44) }    elseif (!$2) { return $gettok($protect.file,7,44) }  }  if ($1 == num) {    if ($2) { writeini z31.ini Main Protect $puttok($protect.file,$2,8,44) }    elseif (!$2) { return $gettok($protect.file,8,44) }  }  if ($1 == pmflood) {    if ($2) { writeini z31.ini Main Protect $puttok($protect.file,$2,9,44) }    elseif (!$2) { return $gettok($protect.file,9,44) }  }} alias protect.file { return $readini(z31.ini,Main,Protect) } alias exempt {  if ($1 == chan) {    if (!$2) { return $z31.file(exempt,01) }    if ($2 == add) { writeini z31.ini exempt 01 $addtok($z31.file(exempt,01),$3,44) }    if ($2 == del) {      if ($z31.file(exempt,01) == $3) { remini z31.ini exempt 01 }      elseif ($z31.file(exempt,01) != $3) { writeini z31.ini exempt 01 $remtok($z31.file(exempt,01),$3,1,44) }    }    elseif ($2) {      if ($z31.file(exempt,01)) {        %Z31.1 = 1        while (%Z31.1 4(OP Abuse)    }  }  unset %z31-*} on @*:KICK:#: {  if ($protection(kick) == on) {    if ($nick == $me) || ($nick == ChanServ) || ($IsExempt($chan) == $true) || ($IsExempt($nick) == $true) { goto end }    if ($knick == $me) {      %z31-kick = $true      %z31-chan = $chan      %z31-nick = $nick      .timerZ31.4 1 1 join %z31-chan    }  }  :end} alias IsBanned {  if ($me isin $1) { return $true }  if ($address($me,0) == $1) { return $true }  if ($address($me,1) == $1) { return $true }  if ($address($me,2) == $1) { return $true }  if ($address($me,3) == $1) { return $true }  if ($address($me,4) == $1) { return $true }  if ($address($me,5) == $1) { return $true }  if ($address($me,6) == $1) { return $true }  if ($address($me,7) == $1) { return $true }  if ($address($me,8) == $1) { return $true }  if ($address($me,9) == $1) { return $true }  if ($gettok($host,4,46) isin $1) { return $true }  else { return $false }} on @*:BAN:#: {  if ($protection(ban) == on) {    if ($nick == $me) || ($nick == ChanServ) || ($IsExempt($chan) == $true) || ($IsExempt($nick) == $true) { goto end }    if ($IsBanned($banmask) == $true) {      set -u8 %z31-ban $true      set -u8 %z31-banmask $banmask      set -u8 %z31-chan $chan      set -u8 %z31-nick $nick      .timerZ31.6 1 1 mode $chan -bo $banmask $nick      .timerZ31.7 1 2 kick $chan $nick Kicked by $me 4(OP Abuse)    }  }  :end} raw *:*: {  if (%z31-kick == $true) {    if ($numeric == 471) || ($numeric == 473) || ($numeric == 474) || ($numeric == 475) {      .timerZ31.5 1 1 chanserv invite %z31-chan      halt    }  }} on ^*:NOTICE:*:*: {  if (%z31-op == $true) || (%z31-kick == $true) || (%z31-ban == $true) && ($nick == ChanServ) {    %chanserv = $strip($1-)    if (access denied isin %chanserv) || (permission denied isin %chanserv) || (You do not have access isin %chanserv) {       echo -a  $+ $color(info) $+ * ChanServ could not complete the operation on %z31-chan $+ . (Access Denied)      unset %z31-*    }    if (not registered isin %chanserv) {      echo -a  $+ $color(info) $+ * ChanServ could not complete the operation on %z31-chan $+ . (Channel not registered)      unset %z31-*    }    unset %chanserv    halt  }} on @*:JOIN:#: {  if ($protection(massjoin) == on) {    if ($IsExempt($chan) == $true) || ($nick isreg $chan) { goto end }    inc % [ $+ [ $chan ] ]    %clones. [ $+ [ $chan ] ] = $addtok(%clones. [ $+ [ $chan ] ],$nick,44)    .timerJOINS1 1 $protection(timer) unset % [ $+ [ $chan ] ]    .timerJOINS2 1 $protection(timer) unset %clones. [ $+ [ $chan ] ]    if (% [ $+ [ $chan ] ] >= $protection(num)) {      mode $chan +dim      .timerJOINS* off      .timerMODE 1 300 mode $chan -dim      clonek $chan    }  }  :end} alias clonek {  %kick = 1  while (%kick 4(Clone) }    inc %kick  }  if (!$timerKICK*) { .timerKICK $+ $rand(1,999) 1 $calc($numtok(%clones. [ $+ [ $1 ] ],44) + 2) ck.us $1 }} alias ck.us {  unset % [ $+ [ $1 ] ]  unset %clones. [ $+ [ $1 ] ]  unset %kick} on *:TEXT:*:#: {  if ($protection(flood) == on) {    if (Serv isin $nick) || ($IsExempt($chan) == $true) || ($IsExempt($nick) == $true) { goto end }    inc % [ $+ [ $nick ] ]    if (!$timer($nick)) { .timer $+ $nick 1 $protection(timer) unset % $+ $nick }    if (% [ $+ [ $nick ] ] >= $protection(num)) {       if ($me isop $chan) { .timer $+ $nick $+ 1 1 1 kick $chan $nick Slow down! 4(Flooding) }      elseif ($me !isop $chan) {        .ignore -u180 $nick $+ !*@*        .echo -a  $+ $color(info) $+ * 4Flooding Detected: $+ $color(info) $chan by $nick - Ignored for 3 minutes.      }      unset % [ $+ [ $nick ] ]    }  }  :end} on *:NOTICE:*:#: {  if ($protection(flood) == on) {    if (Serv isin $nick) || ($IsExempt($chan) == $true) || ($IsExempt($nick) == $true) { goto end }    inc % [ $+ [ $nick ] ]    if (!$timer($nick)) { .timer $+ $nick 1 $protection(timer) unset % $+ $nick }    if (% [ $+ [ $nick ] ] >= $protection(num)) {       if ($me isop $chan) { .timer $+ $nick $+ 1 1 1 kick $chan $nick Slow down! 4(Flooding) }      elseif ($me !isop $chan) {        .ignore -u180 $nick $+ !*@*        .echo -a  $+ $color(info) $+ * 4Flooding Detected: $+ $color(info) $chan by $nick - Ignored for 3 minutes.      }      unset % [ $+ [ $nick ] ]    }  }  :end} on *:ACTION:*:#: {  if ($protection(flood) == on) {    if (Serv isin $nick) || ($IsExempt($chan) == $true) || ($IsExempt($nick) == $true) { goto end }    inc % [ $+ [ $nick ] ]    if (!$timer($nick)) { .timer $+ $nick 1 $protection(timer) unset % $+ $nick }    if (% [ $+ [ $nick ] ] >= $protection(num)) {       if ($me isop $chan) { .timer $+ $nick $+ 1 1 1 kick $chan $nick Slow down! 4(Flooding) }      elseif ($me !isop $chan) {        .ignore -u180 $nick $+ !*@*        .echo -a  $+ $color(info) $+ * 4Flooding Detected: $+ $color(info) $chan by $nick - Ignored for 3 minutes.      }      unset % [ $+ [ $nick ] ]    }  }  :end} on *:TEXT:*:?: {  if ($protection(pmflood) == on) {    if (Serv isin $nick) || ($IsExempt($chan) == $true) || ($IsExempt($nick) == $true) { goto end }    inc % [ $+ [ $nick ] ]    if (!$timer($nick)) { .timer $+ $nick 1 $protection(timer) unset % $+ $nick }    if (% [ $+ [ $nick ] ] >= $protection(num)) {      .ignore -u180 $nick $+ !*@*      .echo -a  $+ $color(info) $+ * 4Flooding Detected: $+ $color(info) Private Message by $nick - Ignored for 3 minutes.      close -m $nick      unset % [ $+ [ $nick ] ]    }  }  :end} on *:ACTION:*:?: {  if ($protection(pmflood) == on) {    if (Serv isin $nick) || ($IsExempt($chan) == $true) || ($IsExempt($nick) == $true) { goto end }    inc % [ $+ [ $nick ] ]    if (!$timer($nick)) { .timer $+ $nick 1 $protection(timer) unset % $+ $nick }    if (% [ $+ [ $nick ] ] >= $protection(num)) {      .ignore -u180 $nick $+ !*@*      .echo -a  $+ $color(info) $+ * 4Flooding Detected: $+ $color(info) Private Message by $nick - Ignored for 3 minutes.      close -m $nick      unset % [ $+ [ $nick ] ]    }  }  :end} on *:NOTICE:*:?: {  if ($protection(flood) == on) {    if (Serv isin $nick) || ($IsExempt($chan) == $true) || ($IsExempt($nick) == $true) { goto end }    inc % [ $+ [ $nick ] ]    if (!$timer($nick)) { .timer $+ $nick 1 $protection(timer) unset % $+ $nick }    if (% [ $+ [ $nick ] ] >= $protection(num)) {      .ignore -u180 $nick $+ !*@*      .echo -a  $+ $color(info) $+ * 4Flooding Detected: $+ $color(info) Notice by $nick - Ignored for 3 minutes.      close -m $nick      unset % [ $+ [ $nick ] ]    }  }  :end} on *:INVITE:#: {  if ($protection(iflood) == on) {    if (Serv isin $nick) || ($IsExempt($chan) == $true) || ($IsExempt($nick) == $true) { goto end }    inc %invites    if (!$timer(invite)) { .timerinvite 1 $protection(timer) unset %invites }    if (%invites >= $calc($protection(num) - 1)) {      ignore -iu240 *!*@*      echo -a  $+ $color(info) $+ * - 4Flooding Detected: $+ $color(info) Invite Flood - All invites ignored for 4 minutes.    }  }  :end}

Link to comment
Share on other sites



×
×
  • Create New...