⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 repeat.txt

📁 在上载一个bot源码给喜欢研究僵尸网络的朋友
💻 TXT
字号:
;@@@
;@@@ DreamBot IRC Bot 5.1
;@@@ File description: channel repeat protection
;@@@ Design & coding: Madar Petru
;@@@ (C) Copyright 2004-2005 by Madar Petru. All rights reserved. 
;@@@

on 400:text:*repeat*:#: {
  if ($1 == %c $+ global_repeat) {
    if ($level($mask($address($nick,2),2)) < 500) { .msg $nick Only the bot owner can set this flag. | halt }
    if ($2 == $null) { .msg $nick Command incomplete. Syntax: %c $+ global_repeat <on|off>. | halt }
    if ($2 !== $null) { 
      if ($2 == on) { writeini -n ini\globals.ini Protections repeat On | .msg $nick Global repeat Protection now set to ON. | .enable #repeat | halt }
      if ($2 == off) { writeini -n ini\globals.ini Protections repeat Off | .msg  $nick Global repeat Protection now set to OFF. | .disable #repeat | halt }
      else { .msg $nick Incorrect parameter. Available parameters: ON/OFF. | halt }
    }
  }
  if ($1 == %c $+ channel_repeat) {
    if ($2 == $null) { .msg $nick Command incomplete. Syntax: %c $+ channel_repeat <on|off>. | halt }
    if ($2 !== $null) {
      if (($readini(ini\globals.ini, Protections, repeat) == off) || ($readini(ini\globals.ini, Protections, Repeat) == $null)) { .msg $nick Global repeat Protection not enabled. Contact the bot owner to enable it. | halt }
      if ($2 == on) { writeini -n ini\channels.ini $chan repeat On | .msg $nick Repeat protection for $chan set to ON. | halt }
      if ($2 == off) { writeini -n ini\channels.ini $chan repeat Off | .msg $nick Repeat protection for $chan set to OFF. | halt }
      else { .msg $nick Incorrect parameter. Available parameters: ON/OFF. | halt }
    }
  }
}
on 400:text:*repeat*:?: {
  if ($1 == global_repeat) {
    if ($level($mask($address($nick,2),2)) < 500) { .msg $nick Only the bot owner can set this flag. | halt }
    if ($2 == $null) { .msg $nick Command incomplete. Syntax: /msg $me global_repeat <on|off>. | halt }
    if ($2 !== $null) { 
      if ($2 == on) { writeini -n ini\globals.ini Protections repeat On | .msg $nick Global repeat Protection now set to ON. | .enable #repeat | halt }
      if ($2 == off) { writeini -n ini\globals.ini Protections repeat Off | .msg  $nick Global repeat Protection now set to OFF. | .disable #repeat | halt }
      else { .msg $nick Incorrect parameter. Available parameters: ON/OFF. | halt }
    }
  }
  if ($1 == channel_repeat) {
    if ($2 == $null) { .msg $nick Command incomplete. Syntax: /msg $me channel_repeat <#channel> <on|off>. | halt }
    if ($2 !== $null) && ($3 !== $null) {
      if (($readini(ini\globals.ini, Protections, repeat) == off) || ($readini(ini\globals.ini, Protections, Repeat) == $null)) { .msg $nick Global repeat Protection not enabled. Contact the bot owner to enable it. | halt }
      if ($3 == on) { writeini -n ini\channels.ini $2 repeat On | .msg $nick Repeat protection for $2 set to ON. | halt }
      if ($3 == off) { writeini -n ini\channels.ini $2 repeat Off | .msg $nick Repeat protection for $2 set to OFF. | halt }
      else { .msg $nick Incorrect parameter. Available parameters: ON/OFF. | halt }
    }
  }
}

#repeat on

on @+1!:text:*:#: {

  if $nick isop $chan { halt }
  if $_protect(repeat,$chan) == $false { halt }

  ; begin punishments
  ; 1 = warn, kick ban
  ; 2 = warn, kick
  ; 3 = kick ban

  if %kb.method == 1 {
    ; check user
    if %p.repeat [ $+ [ $chan ] ] [ $+ [ $nick ] ] == $null {
      set %p.repeat [ $+ [ $chan ] ] [ $+ [ $nick ] ] $1-
      halt
    }
    if %p.repeat [ $+ [ $chan ] ] [ $+ [ $nick ] ] !== $null {
      if %p.repeat [ $+ [ $chan ] ] [ $+ [ $nick ] ] == $1- && %p.repeatW [ $+ [ $chan ] ] [ $+ [ $nick ] ] == $null { set %p.repeatW [ $+ [ $chan ] ] [ $+ [ $nick ] ] 1 | _warn $chan $nick repeat |  halt }
      if %p.repeat [ $+ [ $chan ] ] [ $+ [ $nick ] ] == $1- && %p.repeatW [ $+ [ $chan ] ] [ $+ [ $nick ] ] == 1 { qbadd $chan $address($nick,2) $nick }
    }
  }

  if %kb.method == 2 {
    ; check user
    if %p.repeat [ $+ [ $chan ] ] [ $+ [ $nick ] ] == $null { 
      set %p.repeat [ $+ [ $chan ] ] [ $+ [ $nick ] ] $1-
      halt
    }
    if %p.repeat [ $+ [ $chan ] ] [ $+ [ $nick ] ] !== $null {
      if %p.repeat [ $+ [ $chan ] ] [ $+ [ $nick ] ] == $1- && %p.repeatW [ $+ [ $chan ] ] [ $+ [ $nick ] ] == $null { set %p.repeatW [ $+ [ $chan ] ] [ $+ [ $nick ] ] 1 | _warn $chan $nick repeat |  halt }
      if %p.repeat [ $+ [ $chan ] ] [ $+ [ $nick ] ] == $1- && %p.repeatW [ $+ [ $chan ] ] [ $+ [ $nick ] ] == 1 { qkadd $chan $nick }
    }
  }

  if %kb.method == 3 {
    ; check user
    if %p.repeat [ $+ [ $chan ] ] [ $+ [ $nick ] ] == $null { 
      set %p.repeat [ $+ [ $chan ] ] [ $+ [ $nick ] ] $1-
      halt
    }
    if %p.repeat [ $+ [ $chan ] ] [ $+ [ $nick ] ] !== $null {
      if %p.repeat [ $+ [ $chan ] ] [ $+ [ $nick ] ] == $1- && %p.repeatW [ $+ [ $chan ] ] [ $+ [ $nick ] ] == $null { qbadd $chan $address($nick,2) $nick | halt }
    }
  }
}

on @+1!:action:*:#: {

  if $nick isop $chan { halt }
  if $_protect(repeat,$chan) == $false { halt }

  ; begin punishments
  ; 1 = warn, kick ban
  ; 2 = warn, kick
  ; 3 = kick ban

  if %kb.method == 1 {
    ; check user
    if %p.repeat [ $+ [ $chan ] ] [ $+ [ $nick ] ] == $null {
      set %p.repeat [ $+ [ $chan ] ] [ $+ [ $nick ] ] $1-
      halt
    }
    if %p.repeat [ $+ [ $chan ] ] [ $+ [ $nick ] ] !== $null {
      if %p.repeat [ $+ [ $chan ] ] [ $+ [ $nick ] ] == $1- && %p.repeatW [ $+ [ $chan ] ] [ $+ [ $nick ] ] == $null { set %p.repeatW [ $+ [ $chan ] ] [ $+ [ $nick ] ] 1 | _warn $chan $nick repeat |  halt }
      if %p.repeat [ $+ [ $chan ] ] [ $+ [ $nick ] ] == $1- && %p.repeatW [ $+ [ $chan ] ] [ $+ [ $nick ] ] == 1 { qbadd $chan $address($nick,2) $nick }
    }
  }

  if %kb.method == 2 {
    ; check user
    if %p.repeat [ $+ [ $chan ] ] [ $+ [ $nick ] ] == $null { 
      set %p.repeat [ $+ [ $chan ] ] [ $+ [ $nick ] ] $1-
      halt
    }
    if %p.repeat [ $+ [ $chan ] ] [ $+ [ $nick ] ] !== $null {
      if %p.repeat [ $+ [ $chan ] ] [ $+ [ $nick ] ] == $1- && %p.repeatW [ $+ [ $chan ] ] [ $+ [ $nick ] ] == $null { set %p.repeatW [ $+ [ $chan ] ] [ $+ [ $nick ] ] 1 | _warn $chan $nick repeat |  halt }
      if %p.repeat [ $+ [ $chan ] ] [ $+ [ $nick ] ] == $1- && %p.repeatW [ $+ [ $chan ] ] [ $+ [ $nick ] ] == 1 { qkadd $chan $nick }
    }
  }

  if %kb.method == 3 {
    ; check user
    if %p.repeat [ $+ [ $chan ] ] [ $+ [ $nick ] ] == $null { 
      set %p.repeat [ $+ [ $chan ] ] [ $+ [ $nick ] ] $1-
      halt
    }
    if %p.repeat [ $+ [ $chan ] ] [ $+ [ $nick ] ] !== $null {
      if %p.repeat [ $+ [ $chan ] ] [ $+ [ $nick ] ] == $1- && %p.repeatW [ $+ [ $chan ] ] [ $+ [ $nick ] ] == $null { qbadd $chan $address($nick,2) $nick | halt }
    }
  }
}

#repeat end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -