📄 register.txt
字号:
;@@@
;@@@ DreamBot IRC Bot 5.1
;@@@ File description: owner registration module
;@@@ Design & coding: Madar Petru
;@@@ (C) Copyright 2004-2005 by Madar Petru. All rights reserved.
;@@@
#owner on
on 1:text:*owner*:#: {
if ($1 == %c $+ owner) {
if ($2 == $null) { .msg $nick Command incomplete. Syntax: %c $+ owner <regcode> | halt }
if ($2 !== $null) {
if ($2 !== %regcode) { .msg $nick Invalid registration code. | halt }
if ($2 == %regcode) {
.msg $nick Registration accepted. You are my owner.
writeini -n ini\oper.ini $nick Level Owner
writeini -n ini\oper.ini $nick Hostmask $mask($address($nick,2),2)
writeini -n ini\oper.ini $nick Num 500
write ini\oplines.txt $nick
.guser 500 $nick 2
//set %owner $nick
.msg $nick You must set a password to login when the bot doesn't recognize your host. To set this type /msg $me setpass <password>.
.disable #owner
}
}
}
}
#owner end
;SET BOT LOGIN PASSWORD
on 1:text:setpass*:?: {
if ($readini(ini\oper.ini, $nick, Level) == $null) { closemsg $nick | halt }
if (($readini(ini\oper.ini, $nick, Level) !== $null) && ($2 == $null)) { .msg $nick Command incomplete. Syntax: /msg $me setpass <password>. | closemsg $nick | halt }
if (($readini(ini\oper.ini, $nick, Level) !== $null) && ($2 !== $null)) {
if ($readini(ini\oper.ini, $nick, Password) !== $null) { .msg $nick You have already set your password. Your current password is $readini(ini\oper.ini, $nick, Password) $+ . To change your password use /msg $me chgpass <old password> <new password>. | closemsg $nick | halt }
else {
writeini -n ini\oper.ini $nick Password $2
.msg $nick Done. Set your password to $2 $+ . To login, use /msg $me login $nick $2 $+ .
closemsg $nick
halt
}
}
}
on 1:text:chgpass*:?: {
if ($readini(ini\oper.ini, $nick, Level) == $null) { halt }
if (($readini(ini\oper.ini, $nick, Level) !== $null) && ($2 == $null)) { .msg $nick Command incomplete. Syntax: /msg $me chgpass <old password> <new password>. You must have the nickname that you had when you were first added to the bot's userlist. | halt }
if (($readini(ini\oper.ini, $nick, Level) !== $null) && ($2 !== $null) && ($3 == $null)) { .msg $nick >>> Error. You didn't specified a new password. | halt }
if (($readini(ini\oper.ini, $nick, Level) !== $null) && ($2 !== $null) && ($3 !== $null)) {
if ($readini(ini\oper.ini, $nick, Password) == $null) { .msg $nick You haven't set any password. | halt }
if ($readini(ini\oper.ini, $nick, Password) !== $2) { .msg $nick Wrong old password. Syntax: /msg $me chgpass <old password> <new password> | halt }
if ($readini(ini\oper.ini, $nick, Password) == $2) { remini ini\oper.ini $nick Password | writeini -n ini\oper.ini $nick Password $3 | .msg $nick Done. Changed your password to $3 $+ . }
}
}
on 1:text:login*:?: {
if ($comchan($nick,0) == 0) { .msg $nick To login, you must be on a channel were I am too. | halt }
if ($2 == $null) { .msg $nick Command incomplete. Syntax: /msg $me login <user|nick> <password>. | .msg $nick The username is the nickname you had when you were aded to the bot's userlist. | halt }
if (($2 !== $null) && ($3 == $null)) { .msg $nick You must specify a password to login. | halt }
if (($2 !== $null) && ($3 !== $null)) {
if ($readini(ini\oper.ini, $2, Level) == $null) { .msg $nick >>> Error. Incorrect username or you are not a bot user. | halt }
if (($readini(ini\oper.ini, $2, Level) !== $null) && ($readini(ini\oper.ini, $2, Password) !=== $3)) { .msg $nick >>> Error: Incorrect password. NOTE: Passwords are CASE SENSITIVE. Syntax: /msg $me login <user|nick> <password>. | halt }
if (($readini(ini\oper.ini, $2, Level) !== $null) && ($readini(ini\oper.ini, $2, Password) === $3)) {
.ruser $readini(ini\oper.ini, $2, Hostmask)
//.guser $readini(ini\oper.ini, $2, Num) $nick 2
writeini -n ini\oper.ini $2 Hostmask $mask($address($nick,2),2)
.msg $nick >>> You are now loged in as $2 $+ .
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -