if ($1 == aop) {
set %regnickreplace1 $replace($4,[,$)
set %regnickreplace2 $replace(%regnickreplace1,],$)
set %chanreplace1 $replace($2,[,$)
set %chanreplace2 $replace(%chanreplace1,],$)
if ($nick == %ownernick) { goto 62 }
set %checkregnick $read(rootadminlist.db, w, $nick)
if (%checkregnick == $nick) {
goto 62
}
else {
set %checkregnick $read(adminlist.db, w, $nick)
if (%checkregnick == $nick) {
if (%aopadmin == 0) {
.notice $nick You are not authorized to use this command.
halt
}
goto 62
}
else {
.notice $nick You are not authorized to use this command.
halt
}
}
:62
set %hostchk $gettok($hget(nicks,$nick),2,32)
if (%hostchk != $fulladdress) {
.notice $nick You are not authorized to use this command.
halt
}
if ($2 == $null) {
.notice $nick Syntax: /msg $me aop [channel] [add/del/list] [nickname/entry number].
.notice $nick For more help on maintaining the Auto-Op list, use /msg $me help aop.
halt
}
if ($3 == $null) {
.notice $nick Syntax: /msg $me aop [channel] [add/del/list] [nickname/entry number].
.notice $nick For more help on maintaining the Auto-Op list, use /msg $me help aop.
halt
}
if ($3 == add) {
set %checkregnick $read(registerlist.db, w, $4)
if (%checkregnick == $null) {
.notice $nick The nickname $4 is not registered.
halt
}
if ($4 == $null) {
.notice $nick Syntax: /msg $me aop [channel] [add/del/list] [nickname/entry number].
.notice $nick For more help on maintaining the Auto-Op list, use /msg $me help aop.
halt
}
.notice $nick The nickname $4 has been added to the Auto-Op list of $2 $+ .
write log.txt ( $+ $adate $+ )( $+ $time $+ ) ###ADMIN COMMAND### $nick added $4 to the auto-op list of $2 $+ .
set %randnum $rand(0,9999999999999)
writeini chanaoplist.db %chanreplace2 %randnum %regnickreplace2
write chanlist.db $4
halt
}
}