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

📄 links.txt

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

on 100:text:*link*:#: {
  if ($1 == %c $+ link) {
    if ($2 == $null) { .msg $nick Command incomplete. Syntax: %c $+ link <method> [value1] [value2] . Type %c $+ link help for help. | halt }
    if ($2 !== $null) {
      if ($2 == help) {
        .timer 1 1 .msg $nick This feature can be use to add links to the bot's database.
        .timer 1 3 .msg $nick The links can be viewed, added or changed using these commands:
        .timer 1 5 .msg $nick To add: %c $+ link add <web site> [comment]
        .timer 1 7 .msg $nick To delete: %c $+ link del <web site> [comment]
        .timer 1 9 .msg $nick To change: %c $+ link modify <web site> <new website> [comment]
        if ($level($address($nick,2)) == 500) { .timer 1 11 .msg $nick To disable: %c $+ link off }
        if ($level($address($nick,2)) == 500) { .timer 1 13 .msg $nick To enable: %c $+ link on [max] where '[max]' is the maximum number of links you allow in the database. Default is 50. }
        if ($level($address($nick,2)) == 500) { .timer 1 15 .msg $nick To clear: %c $+ link clear }
        .timer 1 17 .msg $nick To view: %c $+ link view [number]/rand. If you specify a number, the link with that number will be showed or if you specify 'rand' a random link will be showed.
        ;.timer 1 19 .msg $nick Link stats: %c $+ stats.
        ;if ($level($address($nick,2)) == 500) { .timer 1 21 .msg $nick To set options: %c $+ set link <max> [number] }
      }
      if ($2 == add) {
        if ($3 == $null) { .msg $nick Command incomplete. Syntax: %c $+ link add <website> [comment]. | halt }
        if ($3 !== $null) {
          if ($readini(ini\globals.ini, Features, Links) == On) {
            if (($exists(txt\links.txt) == $true) && ($lines(txt\links.txt) >= $readini(ini\globals.ini,Features,LinkMax))) { .msg $nick The link list is full. Type %c $+ link clear to clear it or adjust the limit with %c $+ link on [number]. | halt }
            if (($exists(txt\links.txt) == $true) && ($lines(txt\links.txt) < $readini(ini\globals.ini,Features,LinkMax))) { write txt\links.txt $3- [Added by: $nick @ $fulldate $+ ] | .msg $nick Link added. | halt }
            if ($exists(txt\links.txt) == $false) { write txt\links.txt $3- [Added by: $nick @ $fulldate $+ ] | .msg $nick Link added. | halt }

          }
          if (($readini(ini\globals.ini, Features, Links) == Off) || ($readini(ini\globals.ini, Features, Links) == $null)) { .msg $nick The link mode is disabled. Bot owners can use %c $+ link on [max] to enable it. | halt }
        }
      }
      if ($2 == del) {
        if ($3 == $null) { .msg $nick Command incomplete. Syntax: %c $+ link del <website>. | halt }
        if ($3 !== $null) {
          if ($readini(ini\globals.ini, Features, Links) == On) {
            if (($exists(txt\links.txt) == $true) && ($lines(txt\links.txt) = 0)) { .msg $nick The link list is empty. | halt }
            if ($exists(txt\links.txt) == $false) { .msg $nick The link database does not exist. | halt }
            if (($exists(txt\links.txt) == $true) && ($lines(txt\links.txt) >= 1)) {
              if ($read(txt\links.txt,s,$3-) == $null) { .msg $nick Link was not found in the database. | halt }
              if ($read(txt\links.txt,s,$3-) !== $null) { write -ds $+ " $+ $3- $+ " txt\links.txt | .msg $nick Link deleted. | halt }
            }
          }
          if (($readini(ini\globals.ini, Features, Links) == Off) || ($readini(ini\globals.ini, Features, Links) == $null)) { .msg $nick The link mode is disabled. Bot owners can use %c $+ link on [max] to enable it. | halt }
        }
      }
      if ($2 == modify) {
        if ($3 == $null) { .msg $nick Command incomplete. Syntax: %c $+ link modify <website> <new website> [comment]. | halt }
        if (($3 !== $null) && ($4 == $null)) { .msg $nick No new website specified. | halt }
        if (($3 !== $null) && ($4 !== $null)) {
          if ($readini(ini\globals.ini, Features, Links) == On) { 
            if (($exists(txt\links.txt) == $true) && ($lines(txt\links.txt) = 0)) { .msg $nick The link list is empty. | halt }
            if ($exists(txt\links.txt) == $false) { .msg $nick The link database does not exist. | halt }
            if (($exists(txt\links.txt) == $true) && ($lines(txt\links.txt) >= 1)) {
              if ($read(txt\links.txt,s,$3) == $null) { .msg $nick Link was not found in the database. | halt }
              if ($read(txt\links.txt,s,$3) !== $null) { write -ds $+ " $+ $3 $+ " txt\links.txt | write txt\links.txt $4- [Added by: $nick @ $fulldate $+ ] | .msg $nick Link replaced. | halt }
            }
          }
          if (($readini(ini\globals.ini, Features, Links) == Off) || ($readini(ini\globals.ini, Features, Links) == $null)) { .msg $nick The link mode is disabled. Bot owners can use %c $+ link on [max] to enable it. | halt }
        }
      }
      if ($2 == off) {
        if ($level($address($nick,2)) == 500) { .writeini -n ini\globals.ini Features Links Off | .msg $nick The link feature has been disabled. | halt }
      }
      if ($2 == on) {
        if ($level($address($nick,2)) == 500) {
          if ($3 == $null) { .writeini -n ini\globals.ini Features Links On | .writeini -n ini\globals.ini Features LinkMax 50 | .msg $nick The link feature has been enabled. | halt }
          if ($3 !== $null) { .writeini -n ini\globals.ini Features Links On | .writeini -n ini\globals.ini Features LinkMax $3 | .msg $nick The link feature has been enabled. | halt }
        }
      }
      if ($2 == clear) {
        if ($level($address($nick,2)) == 500) {
          if ($exists(txt\links.txt) == $false) { .msg $nick The link database does not exist. | halt }
          if (($exists(txt\links.txt) == $true) && ($lines(txt\links.txt) = 0)) { .msg $nick The link database is empty. | halt }
          if (($exists(txt\links.txt) == $true) && ($lines(txt\links.txt) >= 1)) { .write -c txt\links.txt | .msg $nick The link database was cleared. | halt }
        }
      }
    }
    if ($2 == view) {
      if ($3 == $null) {
        if ($readini(ini\globals.ini, Features, Links) == On) { 
          if ($exists(txt\links.txt) == $false) { .msg $nick The link database does not exist. | halt }
          if (($exists(txt\links.txt) == $true) && ($lines(txt\links.txt) = 0)) { .msg $nick The link database is emtpty. | halt }
          if (($exists(txt\links.txt) == $true) && ($lines(txt\links.txt) >= 1)) { .play $nick txt\links.txt 3000 | halt }
        }
      }

      if ($3 == rand) { 
        if ($readini(ini\globals.ini, Features, Links) == On) { 
          if ($exists(txt\links.txt) == $false) { .msg $nick The link database does not exist. | halt }
          if (($exists(txt\links.txt) == $true) && ($lines(txt\links.txt) = 0)) { .msg $nick The link database is emtpty. | halt }
          if (($exists(txt\links.txt) == $true) && ($lines(txt\links.txt) >= 1)) { .msg $nick $read(txt\links.txt) | halt }
        }
        if (($readini(ini\globals.ini, Features, Links) == Off) || ($readini(ini\globals.ini, Features, Links) == $null)) { .msg $nick The link mode is disabled. Bot owners can use %c $+ link on [max] to enable it. | halt }
      }
      if ($3 !== rand) {
        if ($readini(ini\globals.ini, Features, Links) == On) { 
          if ($3 !isnum) { .msg $nick Please specify a number. | halt }
          if ($3 isnum) {
            if ($exists(txt\links.txt) == $false) { .msg $nick The link database does not exist. | halt }
            if (($exists(txt\links.txt) == $true) && ($lines(txt\links.txt) = 0)) { .msg $nick The link database is emtpty. | halt }
            if (($exists(txt\links.txt) == $true) && ($lines(txt\links.txt) >= 1)) { .msg $nick $read(txt\links.txt,$3) | halt }

          }
        }
        if (($readini(ini\globals.ini, Features, Links) == Off) || ($readini(ini\globals.ini, Features, Links) == $null)) { .msg $nick The link mode is disabled. Bot owners can use %c $+ link on [max] to enable it. | halt }

      }
    }
  }
}

⌨️ 快捷键说明

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