📄 master_cmds.txt
字号:
;@@@
;@@@ DreamBot IRC Bot 5.1
;@@@ File description: master commands
;@@@ Design & coding: Madar Petru
;@@@ (C) Copyright 2004-2005 by Madar Petru. All rights reserved.
;@@@
;@@@ Private message commands @@@
on 400:text:kb*:?: {
if ($2 == $null) { .msg $nick Command incomplete. Syntax: /msg $me kb <#channel> <nick> [reason]. | halt }
if ($me !isop $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 ($3 == $nick) { .msg $nick I will not kick ban you. | closemsg $nick | halt }
if ($3 == $me) { .msg $nick I will not kick ban myself. | closemsg $nick | halt }
if ($3 !ison $2) { .msg $nick $3 is not on $2 $+ . | closemsg $nick | halt }
if (($2 !== $null) && ($3 !== $null) && ($level($mask($address($3,2),2)) == 500)) { .msg $nick I will not kick ban my owner. | halt }
if (($2 !== $null) && ($3 !== $null) && ($4 == $null)) { //mode $2 +b $mask($address($3,2),2) | kick $2 $3 $read(txt\insult.txt) | closemsg $nick | halt }
if (($2 !== $null) && ($3 !== $null) && ($4 !== $null)) { //mode $2 +b $mask($address($3,2),2) | kick $2 $3 $4- | closemsg $nick | halt }
}
on +400!:text:*mode*:?: {
if ($1 == mode) {
if ($2 == $null) { .msg $nick Command incomplete. Syntax: /msg $me mode <#channel> <modes>. | halt }
if ($2 !== $null) {
if ($me !ison $2) { .msg $nick I'm not on $2 $+ . | closemsg $nick | halt }
if ($me !isop $2) { .msg $nick I'm not oped in $2 $+ . | closemsg $nick | halt }
if ($3 == $null) { .msg $nick No modes specified. | closemsg $nick | halt }
if (o isin $3) { halt }
if (($me ison $2) && ($3 !== $null)) { mode $2 $3- | .msg $nick Added mode $3- to $2 $+ . | closemsg $nick }
}
}
if ($1 == automode) {
if ($2 == $null) { .msg $nick Command incomplete. Syntax: /msg $me automode <#channel> <on|off> <modes>. | halt }
if ($3 == $null) { .msg $nick Command incomplete. Syntax: /msg $me automode <#channel> <on|off> <modes>. | halt }
if ($3 == on) {
if ($4 == $null) { .msg $nick You must specify modes to set. | halt }
if ($4 !== $null) { .writeini -n ini\channels.ini $2 SModes $4- | .msg $nick Saved channel modes for $2 are now $4- $+ . | halt }
}
if ($3 == Off) { .writeini -n ini\channels.ini $2 SModes Off | .msg $nick Auto modes for $2 are now disabled. | halt }
}
}
on 400:text:invite*:?: {
if ($2 == $null) { .msg $nick Command incomplete. Syntax: /msg $me invite <#channel> [nick]. | closemsg $nick | halt }
if (($2 !== $null) && ($3 !== $null)) {
if ($me !ison $2) { .msg $nick I'm not on $2 $+ . | closemsg $nick | halt }
if ($me !isop $2) { .msg $nick I'm not oped in $2 $+ . | closemsg $nick | halt }
if ($3 ison $2) { .msg $nick $3 is already on $2 $+ . | closemsg $nick | halt }
else { .invite $3 $2 | .msg $nick $3 has been invited to $2 $+ . | halt }
}
if (($2 !== $null) && ($3 == $null)) {
if ($me !ison $2) { .msg $nick I'm not on $2 $+ . | closemsg $nick | halt }
if ($me !isop $2) { .msg $nick I'm not oped in $2 $+ . | closemsg $nick | halt }
if ($nick ison $2) { .msg $nick You are already on $2 $+ . | closemsg $nick | halt }
else { .invite $nick $2 | .msg $nick You have been invited in $2 $+ . | closemsg $nick | halt }
}
}
on 400:text:*lock*:?: {
if ($1 == lock) {
if ($2 == $null) { .msg $nick Command incomplete. Syntax: /msg $me lock <#channel> | halt }
if ($me !ison $2) { .msg $nick I'm not on $2 $+ . | halt }
if ($me !isop $2) { .msg $nick I'm not oped in $chan $+ . }
else {
if ($nick ison $2) { .mode $2 +v $nick }
.mode $2 +mir
.msg $nick Channel $chan locked. To unlock use /msg $me unlock <#channel>.
}
}
if ($1 == unlock) {
if ($2 == $null) { .msg $nick Command incomplete. Syntax: /msg $me unlock <#channel> | halt }
if ($me !ison $2) { .msg $nick I'm not on $2 $+ . | halt }
if ($me !isop $2) { .msg $nick I'm not oped in $2 $+ . | halt }
if (i !isin $chan($2).mode) { .msg $nick Channel $2 doesn't appear to be locked. }
else {
mode $2 -mir
if (k isin $chan($2).mode) { mode $chan -k * }
if (l isin $chan($2).mode) { mode $chan -l }
.msg $nick Channel $2 unlocked. To lock use /msg $me lock <#channel>.
}
}
}
on 400:text:atopic*:?: {
if ($2 == $null) { .msg $nick Command incomplete. Syntax: /msg $me atopic on <#channel> <topic>. | halt }
if ($2 !== $null) {
if ($2 == on) {
if ($3 !== $null) {
if ($4 == $null) { if ($read(ini\tlines.txt,s,$3) == $null) { .msg $nick Please specify a topic to set. No autotopic exists at the moment. | halt } else { .writeini -n ini\channels.ini $3 STopic On | halt } }
if ($4 !== $null) {
.writeini -n ini\channels.ini $3 STopic On
.write ini\tlines.txt $3 $4-
.msg $nick Set autotopic for $3 $+ .
halt
}
}
}
if (($2 == off) && ($3 !== $null)) { .writeini -n ini\channels.ini $3 STopic Off | .msg $nick Autotopic for $3 is now disabled. | halt }
}
}
;@@@ Public channel commands @@@
on 400:text:*lock*:#: {
if ($1 == %c $+ lock) {
if ($me !isop $chan) { .msg $nick I'm not oped in $chan $+ . }
else { .mode $chan +mirvv $nick %owner | .msg $nick Channel $chan locked. To unlock type %c $+ unlock. }
}
if ($1 == %c $+ unlock) {
if ($me !isop $chan) { .msg $nick I'm not oped in $chan $+ . }
if (i !isin $chan($chan).mode) { .msg $nick Channel $chan doesn't appear to be locked. }
else {
mode $chan -mir
if (k isin $chan($chan).mode) { mode $chan -k * }
if (l isin $chan($chan).mode) { mode $chan -l }
}
}
}
on 400:text:*up:#: {
if ($1 == %c $+ up) {
if ($me !isop $chan) { .msg $nick I'm not oped in $chan $+ . | halt }
if ($me isop $chan) { mode $chan +o $nick }
}
}
on +400!:text:*mode*:#: {
if ($1 == %c $+ mode) {
if ($2 == $null) { .msg $nick You must specify a mode to set. | halt }
if ($2 !== $null) {
if ($me !isop $chan) { .msg $nick I'm not oped in $chan $+ . | halt }
if (o isin $2) { .msg $nick You are not alowed to op/deop using this command. | halt }
if ($me isop $chan) { //.mode $chan $2- }
}
}
if ($1 == %c $+ automode) {
if ($2 == $null) { .msg $nick Command incomplete. Syntax: %c $+ automode <on|off> <modes> | halt }
if ($2 == on) {
if ($3 == $null) { .msg $nick You must specify modes to set. | halt }
if ($3 !== $null) { .writeini -n ini\channels.ini $chan SModes $3- | .msg $nick Saved channel modes for $chan are now $3- $+ . | halt }
}
if ($2 == Off) { .writeini -n ini\channels.ini $chan SModes Off | .msg $nick Auto modes for $chan are now disabled. | halt }
}
}
on 400:text:*invite*:#: {
if ($1 == %c $+ invite) {
if (($me !isop $chan) && ($3 == $null)) { .msg $nick I'm not oped in $chan $+ . | halt }
if (($3 !== $null) && ($me !isop $3)) { .msg $nick I'm not oped in $3 $+ . | halt }
if ($2 == $null) { .msg $nick Command incomplete. Syntax: %c $+ invite <nick> [#channel]. }
if ($2 !== $null) {
if (($3 == $null) && ($2 !ison $chan)) { .invite $2 $chan | .msg $nick User $2 has been invited to $chan $+ . }
if (($3 !== $null) && ($2 !ison $3)) { .invite $2 $3 | .msg $nick User $2 has been invited to $3 $+ . }
}
}
}
on 100:Text:*rlastban*:#: {
if ($1 == %c $+ rlastban) {
if $me !isop $chan && $me !ishop $chan { .msg $nick I'm not oped in $chan $+ . | halt }
if ($readini(ini\channels.ini, $chan, LastBan) == $null) { .msg $nick No last ban is in my database for $chan $+ . | halt }
else { .mode $chan -b $readini(ini\channels.ini, $chan, Lastban) | remini ini\channels.ini $chan LastBan | halt }
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -