📄 operators.txt
字号:
;@@@
;@@@ DreamBot IRC Bot 5.1
;@@@ File description: bot operators console
;@@@ Design & coding: Madar Petru
;@@@ (C) Copyright 2004-2005 by Madar Petru. All rights reserved.
;@@@
on 500:Text:*addmaster*:#: {
if ($1 == %c $+ addmaster) {
if ($2 == $null) { .msg $nick Command incomplete. Syntax: %c $+ addmaster <nick> | halt }
if ($2 !== $null) {
if ($2 == $me) { .msg $nick I will not add myself. | halt }
if ($readini(ini\oper.ini, $2, Level) !== $null) { .msg $nick User already exists in my userlist at $readini(ini\oper.ini, $2, Level) $+ . | halt }
; if ($level($mask($address($2,2),2)) !== $null) { .msg $nick $2 $+ 's host already exists in my userlist. | halt }
if ($comchan($2,0) == 0) { .msg $nick $2 is not on any of my channels. To add a user you must bring him to a channel were I am too. | halt }
else {
writeini -n ini\oper.ini $2 Level Master
writeini -n ini\oper.ini $2 Num 400
writeini -n ini\oper.ini $2 Hostmask $mask($address($2,2),2)
write ini\oplines.txt $2
.guser 400 $2 2
.msg $nick Added $2 to my userlist at level 400 (Master).
.msg $2 You are now a master of DreamBot.
.msg $2 You must set a password to login when the bot doesn't recognize your host. To set this type /msg $me setpass <password>.
}
}
}
}
on 500:text:*rmaster*:#: {
if ($1 == %c $+ rmaster) {
if ($2 == $null) { .msg $nick Command incomplete. Syntax: %c $+ rmaster <nick>. | halt }
if ($2 !== $null) {
if ($2 == $me) { .msg $nick I'm not listed on that list :). | halt }
if ($2 == $nick) { .msg $nick You're the owner, I will not remove you. | halt }
if ($readini(ini\oper.ini, $2, Level) == $null) { .msg $nick $2 doesn't appear to be in my database. | halt }
if ($readini(ini\oper.ini, $2, Level) !== Master) { .msg $nick $2 is not a master, but he is $readini(ini\oper.ini, $2, Level) $+ . | halt }
else {
.ruser 400 $readini(ini\oper.ini, $2, Hostmask)
.remini ini\oper.ini $2
.write -ds $+ $2 ini\oplines.txt
.msg $nick Master $2 has been REMOVED from my userlist.
.msg $2 You aren't my master anymore.
}
}
}
}
on 500:text:rmaster*:?: {
if ($2 == $null) { .msg $nick Command incomplete. Syntax: %c $+ rmaster <nick>. | halt }
if ($2 !== $null) {
if ($2 == $me) { .msg $nick I'm not listed on that list :). | halt }
if ($2 == $nick) { .msg $nick You're the owner, I will not remove you. | halt }
if ($readini(ini\oper.ini, $2, Level) == $null) { .msg $nick $2 doesn't appear to be in my database. | halt }
if ($readini(ini\oper.ini, $2, Level) !== Master) { .msg $nick $2 is not a master, but he is $readini(ini\oper.ini, $2, Level) $+ . | halt }
else {
.ruser 400 $readini(ini\oper.ini, $2, Hostmask)
.remini ini\oper.ini $2
.write -ds $+ $2 ini\oplines.txt
.msg $nick Master $2 has been REMOVED from my userlist.
.msg $2 You aren't my master anymore.
}
}
}
on 400:Text:*addop*:#: {
if ($1 == %c $+ addop) {
if ($2 == $null) { .msg $nick Command incomplete. Syntax: %c $+ addop <nick> | halt }
if ($2 !== $null) {
if ($2 == $me) { .msg $nick I will not add myself. | halt }
if ($readini(ini\oper.ini, $2, Level) !== $null) { .msg $nick User already exists in my userlist at $readini(ini\oper.ini, $2, Level) $+ . | halt }
if ($comchan($2,0) == 0) { .msg $nick $2 is not on any of my channels. To add a user you must bring him to a channel were I am too. | halt }
else {
writeini -n ini\oper.ini $2 Level Operator
writeini -n ini\oper.ini $2 Num 100
writeini -n ini\oper.ini $2 Hostmask $mask($address($2,2),2)
write ini\oplines.txt $2
.guser 100 $2 2
.msg $nick Added $2 to my userlist at level 100 (Operator).
.msg $2 You are now an operator of DreamBot.
.msg $2 You must set a password to login when the bot doesn't recognize your host. To set this type /msg $me setpass <password>.
}
}
}
}
on 400:text:rop*:?: {
if ($2 == $null) { .msg $nick Command incomplete. Syntax: %c $+ rop <nick>. | halt }
if ($2 !== $null) {
if ($2 == $me) { .msg $nick I'm not listed on that list :). | halt }
if ($2 == $nick) { .msg $nick You're the owner, I will not remove you. | halt }
if ($readini(ini\oper.ini, $2, Level) == $null) { .msg $nick $2 doesn't appear to be in my database. | halt }
if ($readini(ini\oper.ini, $2, Level) !== Operator) { .msg $nick $2 is not a master, but he is $readini(ini\oper.ini, $2, Level) $+ . | halt }
else {
.ruser 100 $readini(ini\oper.ini, $2, Hostmask)
.remini ini\oper.ini $2
.write -ds $+ $2 ini\oplines.txt
.msg $nick Operator $2 has been REMOVED from my userlist.
.msg $2 You aren't my operator anymore.
}
}
}
on 400:text:*rop*:#: {
if ($1 == %c $+ rop) {
if ($2 == $null) { .msg $nick Command incomplete. Syntax: %c $+ rop <nick>. | halt }
if ($2 !== $null) {
if ($2 == $me) { .msg $nick I'm not listed on that list :). | halt }
if ($2 == $nick) { .msg $nick You're the owner, I will not remove you. | halt }
if ($readini(ini\oper.ini, $2, Level) == $null) { .msg $nick $2 doesn't appear to be in my database. | halt }
if ($readini(ini\oper.ini, $2, Level) !== Operator) { .msg $nick $2 is not a master, but he is $readini(ini\oper.ini, $2, Level) $+ . | halt }
else {
.ruser 100 $readini(ini\oper.ini, $2, Hostmask)
.remini ini\oper.ini $2
.write -ds $+ $2 ini\oplines.txt
.msg $nick Operator $2 has been REMOVED from my userlist.
.msg $2 You aren't my operator anymore.
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -