Protection script

By xelent on Jul 15, 2008

Channel protection script:
Kick/ban/flood/repeat/Joinflood protections

Install: Just Copy/Paste in remote (ALT+R) then it works, after you loaded it check out Menus, channel & nick list etc.

;This security bot made by xelent
;Date of creation: 25/4/08
;please dont change credits!.
--------------------------------------
--------------------------------------
;Joinflood protection.
on !*:join:%sec.chan: {
  if (%sec.clone == ON) && (*.users.quakenet.org* !iswm $wildsite) {
    hinc $+(-mu,$iif($hget(jflood,join).unset,$ifmatch,2)) jflood join
    if (!$read(clones.txt, w ,$wildsite)) { write clones.txt $wildsite 
      if (%clones1 != ON) { .timerzxc654 1 4 .remove clones.txt }
    }
    if (!$read(nicks.txt, w ,$nick)) { write nicks.txt $nick 
      if (%clones1 != ON) { .timerzxc655 1 4 .remove nicks.txt }
    }
    if ($hget(jflood,join) >= 4) && (!%split) && (%clones1 != ON) {
      .timerzxc65* off
      mode %sec.chan +mr
      set %sec.adv OFF | set %clones1 ON | set %text-flood OFF | set %reapet OFF
      .timer 1 1 clonesbans
    }
  }
}
;End of Joinflood protection.
--------------------------------------
--------------------------------------
;Advertise protection.
on !*:text:*#*:%sec.chan: {
  if (%sec.adv == ON) {
    if ($nick isreg %sec.chan) { inc -u4 %adv }
    if (!$read(advertise.txt, w ,$wildsite)) { write advertise.txt $wildsite 
      if (%adv1 != ON) { .timerzxc656 1 4 .remove advertise.txt }
    }
    if (!$read(advertisenicks.txt, w ,$nick)) { write advertisenicks.txt $nick 
      if (%adv1 != ON) { .timerzxc657 1 4 .remove advertisenicks.txt }
    }
    if ($nick isreg %sec.chan) && (%adv < 4 ) {
      .timeref 1 1 ban %sec.chan $nick 2 | .timeref2 1 1 kick %sec.chan $nick 1Banned! You are violating Network Rules. [Advertise] ( $+ $date $time $+ )  ID: %num $+ .
    }
    if (%adv >= 4) && (%adv1 != ON) {
      .timere* off | .timerzxc65* off
      mode %sec.chan +mr
      set %adv1 on
      .timer 1 1 advertisebans
    }
  }
}
;End of advertise protections.
--------------------------------------
--------------------------------------
;NetSplit
on !*:quit: {
  if (*.net *.split isin $1-) && (!%split) {
    set -u1200 %split on | halt 
  } 
}
;NetSplit Ends
--------------------------------------
--------------------------------------
;Anti kicks protection.
on !*:kick:%sec.chan: {
  if (%takeover == ON) {
    if ($knick == $me) {
      if ($gettok($address($nick,2),2,64) !isin %masow) && ($nick != $logged($nick)) && ($nick != Q) {
        .timers off | unset %clones1 | .remove clones.txt | unset %adv1 | .remove advertise.txt | .remove advertisenicks.txt | .remove nicks.txt | .msg q ban %sec.chan $wildsite 1Don't Ever Kick The Guard.  | .msg q unbanme %sec.chan | .msg Q removeuser %sec.chan $nick | .timer 1 1 .msg Q invite %sec.chan | .timer 1 2 join %sec.chan | halt
      }
      elseif ($gettok($address($nick,2),2,64) isin %masow) || ($nick == $logged($nick)) || ($nick == Q) {
        .timers off |  unset %clones1 | .remove clones.txt | unset %adv1 | .remove advertise.txt | .remove advertisenicks.txt | .remove nicks.txt | .msg Q invite %sec.chan | .msg Q unbanme %sec.chan | .timer 1 1 join %sec.chan | halt
      }
    }
    if ($knick != $me) {
      if ($nick != Q) && ($gettok($address($nick,2),2,64) !isin %masow) && (($gettok($address($knick,2),2,64) isin %masow) || ($knick == $logged($knick))) {
        .msg Q removeuser %sec.chan $nick | .msg Q ban %sec.chan $wildsite 1Banned! Reason:Kick-Protected. | halt
      }
      if ($gettok($address($nick,2),2,64) !isin %masow) && ($gettok($address($knick,2),2,64) !isin %masow) && ($nick != Q) && ($nick != $logged($nick)) && ($knick != $logged($knick)) {
        if (%kicks [ $+ [ $nick ] ] == $calc(%allow-kick.times -1)) { .msg q ban %sec.chan $wildsite 1Banned! Reason:Don't Ever Takeover here. | .msg Q removeuser %sec.chan $nick | halt }
      }
      inc -u10 %kicks $+ $nick
    }
  }
}
;Anti kicks protection end.
--------------------------------------
--------------------------------------
;Anti bans protection.
on !*:ban:%sec.chan: {
  if (%takeover == ON) {
    if ($gettok($address($nick,2),2,64) !isin %masow) && ($nick != $logged($nick)) && ($banmask !iswm $address($me,6)) && ($nick != Q) {
      if (%bans [ $+ [ $nick ] ] == $calc(%allow-ban.times -1)) {
      .msg q ban %sec.chan $wildsite 1Don't Ever Takeover here. | .msg q removeuser %sec.chan $nick | unset %bans [ $+ [ $nick ] ] | halt }
    }
    inc -u10 %bans $+ $nick
  }
  if ($banmask iswm $address($me,6)) && ($gettok($address($nick,2),2,64) !isin %masow) && ($nick != $logged($nick)) && ($nick != Q) && (%banswtf != ON) {
    set %banswtf ON | .timer 1 15 unset %banswtf | .msg q ban %sec.chan $wildsite 1Banned! Reason:Don't Ever ban the Guard. | .msg Q removeuser %sec.chan $nick | halt
  }
}
;Anti bans protection ends.
--------------------------------------
--------------------------------------
;Joinpart protection.
on !*:part:%sec.chan: { 
  if (%sec.part == ON) && (%clones1 != ON) {
    if (%JoinPart [ $+ [ $nick ] ] == 2) { mode %sec.chan +b $wildsite | kick %sec.chan $nick 1Banned! You Are Violating Network Rules. ( $+ $date $time $+ ) ID: %num | inc %num  | unset %JoinPart [ $+ [ $nick ] ] | halt }
    inc -u15 %JoinPart $+ $nick
  }
}
;Joinpart protection end.
--------------------------------------
--------------------------------------
;Flood&Reapet protections.
on *:text:*:%sec.chan:{
  if ($nick isreg %sec.chan) {
    hinc $+(-mu,$iif($hget(flood,text).unset,$ifmatch,3)) flood text
    if ($hget(flood,text) > 20) && (%flooding != ON) {
      set %text-flood OFF | set %reapet off | set %flooding ON 
      mode %sec.chan +mr | .timer 1 100 mode %sec.chan -mr | .timer 1 100 set %reapet ON | .timer 1 100 set %text-flood ON | .timer 1 100 unset %flooding | halt
    }
    if (%text-flood == ON) {
      inc -u3 %flood. $+ $nick
      if (%flood. [ $+ [ $nick ] ] == $calc(%allow-flood.times -1)) { mode %sec.chan +b $wildsite | kick %sec.chan $nick 1Banned! You are violating Network Rules. [FLood] ( $+ $date $time $+ )  ID: %num $+ . | inc %num | halt }
    }
    if (%reapet == ON) {
      if (%reapet [ $+ [ $nick ] ] [ $+ [ $1 ] ] == $calc(%allow-reapet.times -1)) { mode %sec.chan +b $wildsite | kick %sec.chan $nick 1Banned! You are violating Network Rules. [Reapet] ( $+ $date $time $+ )  ID: %num $+ .  | inc %num | halt }
      inc -u3 %reapet $+ $nick $+ $1
    }
  }
  if (* $+ $str(d,1) $+ $chr(105) $+ $str(t,1) $+ $chr(115) iswm $1) && (!%flood) { $getush(%sec.chan) | set -u3 %flood 1 }
}
;FLood&Reapet protections end.
-----------------------------------------
--------------------------------------
;Anti deops protection
on !*:deop:%sec.chan:{
  if (%takeover == ON) {
    if ($opnick == $me) {
      if ($gettok($address($nick,2),2,64) !isin %masow) && (*quakenet* !iswm $nick) && ($nick != $logged($nick)) && (%banswtf != ON) {
        set %banswtf ON | .timer 1 15 unset %banswtf
        if ($me ison %sec.chan) { .msg Q op %sec.chan | .msg Q removeuser %sec.chan $nick | .msg q ban %sec.chan $wildsite 1Banned! Reason:Don't Ever Deop the Guard. | halt }
      }
      elseif ($gettok($address($nick,2),2,64) isin %masow) || ($nick == $logged($nick)) || (*quakenet* iswm $nick) {
        .msg Q op %sec.chan | halt
      }
    }
    elseif ($opnick != $me) {
      if ($gettok($address($nick,2),2,64) !isin %masow) && (*quakenet* !iswm $nick) && (Q !iswm $nick) && (($gettok($address($opnick,2),2,64) isin %masow) || ($opnick == $logged($opnick))) {
        .msg Q removeuser %sec.chan $nick | .msg Q ban %sec.chan $wildsite 1Banned! Reason:Don't Deop protected users. | halt
      }
    }
  }
}
;Anti deops protection end.
--------------------------------------
--------------------------------------
;Action protection.
on !*:action:*:%sec.chan: {
  if (%action == ON) && ($nick isreg %sec.chan) && (%clones1 != ON) {
    hinc $+(-mu,$iif($hget(action,$wildsite).unset,$ifmatch,2)) flooding $wildsite
    if ($hget(flooding,$wildsite) >= 4) {
      mode %sec.chan +b $wildsite | kick %sec.chan $nick  1Banned! You are violating Network Rules. [FLood] ( $+ $date $time $+ )  ID: %num $+ .  | inc %num | halt
    }
    if ($chr(35) isin $1-) {
      mode %sec.chan +b $wildsite | 1Banned! You are violating Network Rules. [Advertise] ( $+ $date $time $+ )  ID: %num $+ . | inc %num | halt
    }
  }
}
;Action protection ends.
--------------------------------------
--------------------------------------
;end of protections;
;end of protections;
;end of protections;

--------------------------------------
--------------------------------------
;menu
menu * {
  Protection Settings
  .Masterpass:set %masterpass $?\"Enter The master pass here."
  .Channel:set %sec.chan $?\"Type your chan here, dont forget #" | .timer 1 5 msg %sec.chan This channel is now beeing protected by me. | join %sec.chan 
  .Sign:set %sec.sign $?\"Type The sign here , ex: !/@/+/-" | echo -a Done the sign has been set to : " $+ %sec.sign $+ "
  .show Protection status: echo -d 7,1The Protection Status Are : Join-Flood = $iif(%sec.clone == ON,4ON,3OFF) 7___ Adv = $iif(%sec.adv == ON,4ON,3OFF) 7___Anti-Takeover = $iif(%takeover == ON,4ON,3OFF) 7___Join/Part = $iif(%sec.part == ON,4ON,3OFF) 7___Anti-Flood = $iif(%text-flood == ON,4ON,3OFF) 7___Reapet == $iif(%reapet == ON,4ON,3OFF) 7___Action = $iif(%action == ON,4ON,3OFF)  
  .Set Protection ON/OFF
  ..ALL Protections
  ...ON:ALLON
  ...OFF:ALLOFF 
  ..JoinFlood
  ...ON:set %sec.clone ON | echo -a JoinFLood protection are now ON
  ...OFF:set %sec.clone OFF | echo -a JoinFLood protection are now OFF
  ..Adv-Protection
  ...ON:set %sec.adv ON | echo -a Adv protection are now ON
  ...OFF:set %sec.adv OFF | echo -a Adv protection are now OFF
  ..Anti-Takeover
  ...ON:set %takeover ON | echo -a Anti Takeover protections are now ON
  ...OFF:set %takeover OFF | echo -a Anti Takeover protections are now OFF
  ..Flood
  ...ON:set %text-flood ON | echo -a Text Flood protections are now ON
  ...OFF:set %text-flood OFF | echo -a Text Flood protections are now OFF
  ..Reapet
  ...ON:set %reapet ON | echo -a Reapet protections are now ON
  ...OFF:set %reapet OFF | echo -a Reapet protections are now OFF
  ..Action
  ...ON:set %action ON | echo -a Action protections are now ON
  ...OFF:set %action OFF | echo -a Action protections are now OFF
  ..Join/part
  ...ON:set %sec.part ON | echo -a Join Part protections are now ON
  ...OFF:set %sec.part OFF | echo -a Join Part protections are now OFF
  Owners/Protected
  .set bot Protected: { set %masow1 $?\"Type The owner Qacc here" | if (%masow1) {
      if (%masow1 $+ .users.quakenet.org !isin %masow) { set %masow $addtok(%masow,%masow1 $+ .users.quakenet.org,32) | echo -a %masow1 $+ .users.quakenet.org Is Now Protected }
      elseif (%masow1 $+ .users.quakenet.org isin %masow) { echo -a %masow1 $+ .users.quakenet.org is already Protected } 
    }
  }
  .remove bot Protected: { set %masow1 $?\"Type The owner Qacc That u want to remove" | if (%masow1) {
      if (%masow1 $+ .users.quakenet.org isin %masow) { set %masow $remtok(%masow,%masow1 $+ .users.quakenet.org,32) | echo -a %masow1 $+ .users.quakenet.org Is No Longer Protected }
      elseif (%masow1 $+ .users.quakenet.org !isin %masow) { echo -a %masow1 $+ .users.quakenet.org Is Not On The Protected List } 
    }
  }
  .set bot owner:writeini admins.ini $?\"Enter the user here!" password $?\"Enter The Password Here."
  .remove bot owner:remini admins.ini $?\"Enter The user you want to remove here." 
  .show bot protected:echo -d 7,1The protected are( $+ $numtok(%masow,32) $+ ): %masow
  .show bot owners:$iif($exists(admins.ini),run admins.ini,echo -a The owners Table is empty.)
  .Clear all protected:unset %masow | echo -a protected list is now empty.
  .Clear all owners:unset %owners | echo -a owner list is now empty.
  Times Allow
  .Allow flood times
  ..1:set %allow-flood.times 1 | echo -a users will be banned after 1 flood
  ..2:set %allow-flood.times 2 | echo -a users will be banned after 2 flood
  ..3:set %allow-flood.times 3 | echo -a users will be banned after 3 flood
  ..4:set %allow-flood.times 4 | echo -a users will be banned after 4 flood
  ..5:set %allow-flood.times 5 | echo -a users will be banned after 5 flood
  .Allow kick times
  ..1:set %allow-kick.times 1 | echo -a users will be banned after 1 kicks
  ..2:set %allow-kick.times 2 | echo -a users will be banned after 2 kicks
  ..3:set %allow-kick.times 3 | echo -a users will be banned after 3 kicks
  ..4:set %allow-kick.times 4 | echo -a users will be banned after 4 kicks
  ..5:set %allow-kick.times 5 | echo -a users will be banned after 5 kicks
  .Allow ban times
  ..1:set %allow-ban.times 1 | echo -a users will be banned after 1 bans
  ..2:set %allow-ban.times 2 | echo -a users will be banned after 2 bans
  ..3:set %allow-ban.times 3 | echo -a users will be banned after 3 bans
  ..4:set %allow-ban.times 4 | echo -a users will be banned after 4 bans
  ..5:set %allow-ban.times 5 | echo -a users will be banned after 5 bans
  .Allow reapet times
  ..1:set %allow-reapet.times 1 | echo -a users will be banned after 1 reapets
  ..2:set %allow-reapet.times 2 | echo -a users will be banned after 2 reapets
  ..3:set %allow-reapet.times 3 | echo -a users will be banned after 3 reapets
  ..4:set %allow-reapet.times 4 | echo -a users will be banned after 4 reapets
  ..5:set %allow-reapet.times 5 | echo -a users will be banned after 5 reapets
  .Show all times:echo -d 7,1The time before bans are : bans-allow = %allow-ban.times ____ kick-allow = %allow-kick.times ___ reapet-allow = %allow-reapet.times ___ times text-allow = %allow-flood.times $+ .
  -
  fun
  .qnet
  ..av:.msg q chanlev $chan $$1 +av
  ..ao:.msg q chanlev $chan $$1 +ao
  ..amo:.msg q chanlev $chan $$1 +amo
  ..amno:.msg q chanlev $chan $$1 +amno
  ..-av:.msg q chanlev $chan $$1 -av
  ..-ao:.msg q chanlev $chan $$1 -ao
  ..-amo:.msg q chanlev $chan $$1 -amo
  ..-amno:.msg q chanlev $chan $$1 -amno
  ..Qwelcome:.msg q welcome $chan $?\"Enter The Topic Here."
  ..settopic:.msg q settopic $chan $?\"Enter The Topic Here."
  ..autolimit:.msg q autolimit $chan $?\"Enter The Topic Here."
  ..recover:.msg q recover $chan
  ..deopall:.msg q deopall $chan
  ..unbanall:.msg q unbanall $chan
  ..unQbanAll:.msg q unbanmask $chan *!*@*
  ..Qban:msg q ban $chan $address($$1,2)
  ..Hello (make a Qacc):set %emaill $?\"Enter Your Full Email here." | msg q hello %emaill %emaill | echo -a Go check ur email.
  .Normal commands:
  ..voice:mode $chan +vvvvvv $$1 $2 $3 $4 $5 $6
  ..devoice:mode $chan -vvvvvv $$1 $2 $3 $4 $5 $6
  ..op:mode $chan +oooooo $$1 $2 $3 $4 $5 $6
  ..deop:mode $chan -oooooo $$1 $2 $3 $4 $5 $6
  ..ban:ban $chan $$1 2
  ..kick:kick $chan $$1 1are u still here? o_O ( $+ $time $date $+ )
  ..kick with reason:kick $chan $$1 $?\"Enter The Reason For Kick here."
  ..ban-kick:ban -k $chan $$1 2 1are u still here? o_O ( $+ $time $date $+ )
  ..ban-kick with reason:ban -k $chan $$1 2 $?\"Enter The Reason For Kick here."
  ..kick-times:set %nnkicknn $?\"Enter The Number of times For Kick here." | if (%nnkicknn isnum) { set %kick $+ $$1 %nnkicknn | kick $chan $$1 1 $+ 1/ $+ %kick [ $+ [ $$1 ] ] $nick are u still here? o_O ( $+ $time $date $+ ) } | else { echo -a please enter only numbers. | halt }
  ..modes
  ...in-channel
  ....m
  .....+:mode $chan +m
  .....-:mode $chan -m
  ....i
  .....+:mode $chan +i
  .....-:mode $chan -i
  ....r
  .....+:mode $chan +r
  .....-:mode $chan -r
  ....s
  .....+:mode $chan +s
  .....-:mode $chan -s
  ....c
  .....+:mode $chan +c
  .....-:mode $chan -c
  ....t
  .....+:mode $chan +t
  .....-:mode $chan -t
  ....T
  .....+:mode $chan +T
  .....-:mode $chan -T
  ....n
  .....+:mode $chan +n
  .....-:mode $chan -n
  ....N
  .....+:mode $chan +N
  .....-:mode $chan -N
  ....C
  .....+:mode $chan +C
  .....-:mode $chan -C
  ....u
  .....+:mode $chan +u
  .....-:mode $chan -u
  ....D
  .....+:mode $chan +D
  .....-:mode $chan -D
  ....d
  .....+:mode $chan +d
  .....-:mode $chan -d
  ....M
  .....+:mode $chan +M
  .....-:mode $chan -M
  ....k
  .....+key:mode $chan +k $?\"Enter The Key Here..."  
  .....-key:mode $chan -k $?\"Enter The Key Here..."
  ....l
  .....OFF:mode $chan -l
  .....Chose:mode $chan +l $?\"Enter The Limit Here..."
  ....chose modes
  .....chose:mode $chan $?\"Enter The Modes Here... For Ex:+mr-i and etc.."
  .....all +:mode $chan +smtinrDucCNTM
  .....all -:mode $chan -smtinrDucCNTM
  ...myself
  ....R
  .....ON:mode $me +R
  .....OFF:mode $me -R
  ....x
  .....ON:mode $me +x
  .....OFF:mode $me -x
  ....w
  .....ON:mode $me +w
  .....OFF:mode $me -w
  ....selected:mode $me $?\"Enter The Modes Here... For Ex:+ixR"
  ..ignore
  ...ignore:ignore $address($$1,2)
  ...unignore:ignore -r $address($$1,2)
  ...ignoreALL:ignore *
  ...unignoreALL:ignore -r *
  ..ctcp
  ...version:ctcp $$1 version
  ...ping:ctcp $$1 ping
  ...time:ctcp $$1 time
  ..whois:whois $$1
  ..info:uwho $$1
  ..Query:q $$1
  .blacklist
  ..add:set %black $addtok(%black,$address($$1,2),32) | ban -k %sec.chan $$1 2 1Black listed. ( $+ $date $time $+ )
  ..remove:set %black $remtok(%black,$address($$1,2),32) 
  ..Show blacklist:echo -d 7,1The blacklist is:( $+ $numtok(%black,32) $+ ) %black 
  ..Clear blacklist:unset %black
  .bantag:set -u10 %bantagush  $?\"Type the tag u want to kick&ban here. for ex: [A] / [B]" | bantag %bantagush | mode %sec.chan +b %bantagush $+ *!*@* 
  .commands:helper1
  .protection-status:pstatus2
}
;menu end;

Comments

Sign in to comment.
Cheiron   -  Jul 15, 2008

initially.. just point out on the introduction that this was made for the Quakenet server. that is just the first glance i have had. will have a proper look in a short while once had sleep.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.