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

📄 op_cmds.txt

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

on 100:text:*topic*:#: {
  if ($1 == %c $+ topic) {
    if ($2 == $null) { .msg $nick Command incomplete. Syntax: %c $+ topic <topic>. | halt }
    if ($2 !== $null) {
      if ($2- === $chan($chan).topic) { .msg $nick New topic same as old topic. | halt }
      if ($readini(ini\channels.ini, $chan, STopic) == On) { .msg $nick AutoTopic is active on $chan $+ . To change the topic you must either disable AutoTopic (using %c $+ atopic off) or set another autotopic (using %c $+ atopic on <topic>). | halt }
      if (($me !isop $chan) && ($me !ishop $chan) && (t isin $chan($chan).mode)) { .msg $nick I'm not oped in $chan $+ . | halt }
      if (($me !isop $chan) && (t !isin $chan($chan).mode)) { topic $chan $2- | .msg $nick Changed topic for $chan to $2- $+ . | halt }
      if ($me isop $chan) || ($me ishop $chan) { //topic $chan $2- | .msg $nick Changed topic for $chan to $2- $+ . }
    }
  }
  if ($1 == %c $+ atopic) {
    if ($level($address($nick,2)) < 400) { .msg $nick You don't have access to this command. | halt }
    if ($2 == $null) { .msg $nick Command incomplete. Syntax: %c $+ atopic on <topic>. | halt }
    if ($2 !== $null) {
      if ($2 == on) {
        if ($3 == $null) { 
          if ($read(ini\tlines.txt,s,$chan) == $null) { 
            .msg $nick Please specify a topic to set. No autotopic exists at the moment. 
            halt 
          } 
          .writeini -n ini\channels.ini $chan STopic On
          .msg $nick Auto Topic for $chan is enabled. 
        }
        if ($3 !== $null) {
          if ($read(ini\tlines.txt,s,$chan) !== $null) {
            .writeini -n ini\channels.ini $chan STopic On
            .write -ds $+ $chan ini\tlines.txt
            .write ini\tlines.txt $chan $3-
            .msg $nick Set autotopic for $chan $+ .
            halt
          }
          if ($read(ini\tlines.txt,s,$chan) == $null) {
            .writeini -n ini\channels.ini $chan STopic On
            .write ini\tlines.txt $chan $3-
            .msg $nick Set autotopic for $chan $+ .
            halt
          }
        }
      }
      if ($2 == off) { .writeini -n ini\channels.ini $chan STopic Off | .msg $nick Auto topic for $chan has been disabled. | halt }
    }  
  }
}
on 100:text:topic*:?: {
  if ($2 == $null) { .msg $nick Command incomplete. Syntax: /msg $me topic <#channel> <topic>. | closemsg $nick | halt }
  if ($2 !== $null) { 
    if ($me !ison $2) { .msg $nick I'm not on $2 $+ . | closemsg $nick | halt }
    if ($readini(ini\channels.ini, $2, STopic) == On) { .msg $nick AutoTopic is active on $2 $+ . To change the topic you must either disable AutoTopic (using /msg $me atopic $2 off) or set another autotopic (using /msg $me atopic on $2 <topic>). | halt }    
    if ($me !isop $2) && ($me !ishop $2) { .msg $nick I'm not oped in $2 $+ . | halt }
    if ($3 == $null) { .msg $nick No topic specified. | closemsg $nick | halt }
    if ($3 !== $null) { topic $2 $3- | .msg $nick Topic for $2 set to $3- $+. | closemsg $nick | halt }
  }
}
on 100:text:op*:?: {
  if ($2 == $null) { .msg $nick Command incomplete. Syntax: /msg $me op <#channel> [nick] | halt }
  if ($me !ison $2) { .msg $nick I'm not on that channel. | closemsg $nick | halt }
  if ($me !isop $2) { .msg $nick I'm not oped on $2 $+ . | closemsg $nick | halt }
  if (($2 !== $null) && ($3 == $null) && ($nick isop $2)) { .msg $nick You're already oped in $2 $+ . | closemsg $nick | halt }
  if (($2 !== $null) && ($3 == $null)) { mode $2 +o $nick | closemsg $nick }
  if (($2 !== $null) && ($3 !== $null)) { mode $2 +o $3 | closemsg $nick }
}
on 100:text:deop*:?: {
  if ($2 == $null) { .msg $nick Command incomplete. Syntax: /msg $me deop <#channel> [nick] | halt }
  if ($me !ison $2) { .msg $nick I'm not on that channel. | closemsg $nick | halt }
  if ($me !isop $2) { .msg $nick I'm not oped in $2 $+ . | closemsg $nick | halt } 
  if (($2 !== $null) && ($3 == $null) && ($nick !isop $2)) { .msg $nick You're not oped in $2 $+ . | closemsg $nick | halt }
  if (($2 !== $null) && ($3 == $null)) { mode $2 -o $nick | closemsg $nick }
  if ($level($mask($address($3,2),2)) == 500) { .msg $nick I will not deop my owner. | halt }
  if ($3 == $me) { .msg $nick I don't think I'll like this. | closemsg $nick | halt }
  if (($2 !== $null) && ($3 !== $null)) { mode $2 -o $3 | closemsg $nick }
}
on 100:text:voice*:?: {
  if ($2 == $null) { .msg $nick Command incomplete. Syntax: /msg $me voice <#channel> [nick ... nick12] | halt }
  if ($me !isop $2) && ($me !ishop $2) { .msg $nick I'm not oped in $2 $+ . | closemsg $nick | halt } 
  if ($me !ison $2) { .msg $nick I'm not on that channel. | closemsg $nick | halt }
  if (($2 !== $null) && ($3 == $null) && ($nick isvoice $2)) { .msg $nick You're already voiced in $2 $+ . | closemsg $nick | halt }
  if (($2 !== $null) && ($3 == $null)) { mode $2 +v $nick | closemsg $nick }
  if (($2 !== $null) && ($3 !== $null)) { //mode $2 + $+ $str(v, $numtok($3-,32)) $3- | closemsg $nick }
}
on 100:text:devoice*:?: {
  if ($2 == $null) { .msg $nick Command incomplete. Syntax: /msg $me devoice <#channel> [nick ... nick12] | halt }
  if ($me !isop $2) && ($me !ishop $2) { .msg $nick I'm not oped in $2 $+ . | closemsg $nick | halt } 
  if ($me !ison $2) { .msg $nick I'm not on that channel. | closemsg $nick | halt }
  if (($2 !== $null) && ($3 == $null) && ($nick !isvoice $2)) { .msg $nick You're not voiced in $2 $+ . | closemsg $nick | halt }
  if (($2 !== $null) && ($3 == $null)) { mode $2 -v $nick | closemsg $nick }
  if (($2 !== $null) && ($2 !== $null)) { //mode $2 - $+ $str(v, $numtok($3-,32)) $3- | closemsg $nick }
}
on 100:text:kick*:?: { 
  if ($2 == $null) { .msg $nick Command incomplete. Syntax: /msg $me kick <#channel> <nick> [reason]. | halt }
  if ($me !isop $2) && ($me !ishop $2) { .msg $nick I'm not oped in $2 $+ . | closemsg $nick | halt } 
  if ($me !ison $2) { .msg $nick I'm not on that channel. | closemsg $nick | halt }
  if (($2 !== $null) && ($3 == $null)) { .msg $nick You didn't specified the nickname to kick | closemsg $nick | halt }
  if ($level($mask($address($2,2),2)) > $level($mask($address($nick,2),2))) { .msg $nick You can't ban an operator with a higher level. | halt }
  if (($2 !== $null) && ($3 !== $null) && ($level($mask($address($3,2),2)) == 500)) { .msg $nick I will not kick my owner. | halt }
  if (($2 !== $null) && ($3 !== $null) && ($4 == $null)) { kick $2 $3 $read(txt\insult.txt) | closemsg $nick }
  if (($2 !== $null) && ($3 !== $null) && ($4 !== $null)) { kick $2 $3 $4- | closemsg $nick }
}

on 100:text:*kb*:#: {
  if ($1 == %c $+ kb) {
    if ($me !isop $chan) && ($me !ishop $chan) { .msg $nick I'm not oped in $chan $+ . | halt }
    if ($2 == $null) { .msg $nick Command incomplete. Syntax: %c $+ kb <nick> [reason]. | halt }
    if ($2 !== $null) {
      if ($level($mask($address($2,2),2)) > $level($mask($address($nick,2),2))) { .msg $nick You can't ban an operator with a higher level. | halt }
      if ($level($mask($address($2,2),2)) == 500) { .msg $nick I will not kick ban my owner. | halt }
      if ($2 == $me) { .msg $nick I will not kick ban myself. | halt }
      if ($2 == $nick) { .msg $nick I will not kick ban you. | halt }
      if ($2 !ison $chan) { .msg $nick $2 is not on $chan $+ . | halt }
      if (($2 !== $null) && ($3 == $null)) { mode $chan +b $mask($address($2,2),2) | .kick $chan $2 $read(txt\insult.txt) | halt }
      if (($2 !== $null) && ($3 !== $null)) { mode $chan +b $mask($address($2,2),2) | .kick $chan $2 $3- | halt }
    }
  }
}
on 100:text:*op*:#: {
  if ($1 == %c $+ op) {
    if ($2 == $null) {
      if ($me !isop $chan) { .msg $nick I'm not oped in $chan $+ . | halt }
      if ($nick isop $chan) { .msg $nick You are already oped in $chan $+ . | halt }
      if ($me isop $chan) { mode $chan +o $nick }
    }
    else {
      if ($me !isop $chan) { .msg $nick I'm not oped in $chan $+ . | halt }
      if ($2 !ison $chan) { .msg $nick $2 is not on $chan $+ . | halt }
      if ($2 isop $chan) { .msg $nick $2 is already oped in $chan $+ . | halt }
      if ($level($address($nick,2)) >= 400) { //.mode $chan + $+ $str(o,$numtok($2-,32)) $2-  }
      if ($2 ison $chan ) { .mode $chan +o $2 }
    }

  }
  if ($1 == %c $+ deop) {
    if ($2 == $null) {
      if ($me !isop $chan) { .msg $nick I'm not oped in $chan $+ . | halt }
      if ($nick !isop $chan) { .msg $nick You aren't oped in $chan $+ . | halt }
      if ($me isop $chan) { mode $chan -o $nick }
    }
    else {
      if ($me !isop $chan) { .msg $nick I'm not oped in $chan $+ . | halt }
      if ($2 == $me) { .msg $nick I will not deop myself. | halt }
      if ($2 !ison $chan) { .msg $nick $2 is not on $chan $+ . | halt }
      if ($level($mask($address($2,2),2)) > $level($mask($address($nick,2),2))) { .msg $nick You can't deop an operator with a higher level. | halt }
      if ($level($mask($address($2,2),2)) == 500) { .msg $nick I will not deop my owner. | halt }
      if ($2 !isop $chan) { .msg $nick $2 isn't oped in $chan $+ . | halt }
      if ($level($address($nick,2)) == 500) { //mode $chan - $+ $str(o, $numtok($2-,32)) $2- | halt }
      if ($2 ison $chan) { .mode $chan -o $2 }
    }
  }
}
on 100:text:*voice*:#: {
  if ($1 == %c $+ voice) {
    if ($2 == $null) {
      if ($me !isop $chan) && ($me !ishop $chan) { .msg $nick I'm not oped in $chan $+ . | halt }
      if ($nick isvoice $chan) { .msg $nick You are already voiced in $chan $+ . | halt }
      if ($me isop $chan) || ($me ishop $chan) { mode $chan +v $nick }
    }
    else {
      if ($me !isop $chan) && ($me !ishop $chan) { .msg $nick I'm not oped in $chan $+ . | halt }
      if ($2 !ison $chan) { .msg $nick $2 is not on $chan $+ . | halt }
      if ($2 isvoice $chan) { .msg $nick $2 is already voiced in $chan $+ . | halt }
      if ($2 ison $chan ) { /.mode $chan + $+ $str(v,$numtok($2-,32)) $2- }
    }

  }
  if ($1 == %c $+ devoice) {
    if ($2 == $null) {
      if ($me !isop $chan) && ($me !ishop $chan) { .msg $nick I'm not oped in $chan $+ . | halt }
      if ($nick !isvoice $chan) { .msg $nick You aren't voiced in $chan $+ . | halt }
      if ($me isop $chan) || ($me ishop $chan) { mode $chan -v $nick | halt  }
    }
    else {
      if ($me !isop $chan) && ($me !ishop $chan) { .msg $nick I'm not oped in $chan $+ . | halt }
      if ($2 == $me) { .msg $nick I will not devoice myself. | halt }
      if ($2 !ison $chan) { .msg $nick $2 is not on $chan $+ . | halt }
      if ($2 !isvoice $chan) { .msg $nick $2 isn't voiced $chan $+ . | halt }
      if ($level($mask($address($2,2),2)) > $level($mask($address($nick,2),2))) { .msg $nick I will not devoice my owner. | halt }
      if ($2 ison $chan ) { //.mode $chan - $+ $str(v,$numtok($2-,32)) $2- }
    }
  }
}
on 100:text:*kick*:#: {
  if ($1 == %c $+ kick) {
    if ($me !isop $chan) && ($me !ishop $chan) { .msg $nick I'm not oped in $chan $+ . | halt }
    if ($2 == $null) { .msg $nick Command incomplete. Syntax: %c $+ kick <nick> [reason]. | halt }
    if ($2 !== $null) {
      if ($2 == $me) { .msg $nick I will not kick myself. | halt }
      if ($2 !ison $chan) { .msg $nick $2 is not on $chan $+ . | halt }
      if ($2 == $nick) { .msg $nick I will not kick you. | halt }
      if ($level($mask($address($2,2),2)) > $level($mask($address($nick,2),2))) { .msg $nick You can't kick an operator with a higher level. | halt }
      if ($level($mask($address($2,2),2)) == 500) { .msg $nick I will not kick my owner. | halt }
      if (($2 !== $null) && ($3 == $null)) { .kick $chan $2 $read(txt\insult.txt) | halt }
      if (($2 !== $null) && ($3 !== $null)) { .kick $chan $2 $3- | halt }
    }
  }
}

⌨️ 快捷键说明

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