on *:start: {
hmake AOP 100
if ($exists(AOP.txt)) hload AOP AOP.txt
}
on admin:TEXT:`alo*:#:{
addlocal # $2 HOST
}
on admin:TEXT:`alq*:#:{
addlocal # $2 OWNER
}
on admin:TEXT:`alb*:#:{
addlocal # $2 BAN
}
on admin:TEXT:`ago*:#:{
addglobal # $2 HOST
}
on admin:TEXT:`agq*:#:{
addglobal # $2 OWNER
}
on admin:TEXT:`agb*:#:{
addglobal # $2 BAN
}
on admin:TEXT:`shaop:#:{
set %aopnum 1
set %AOP1 $matchtok($hget(AOP,$hget(AOP,%aopnum).item),$chr(94),0,32)
while (%aopnum <= $hget(AOP,0).item) { showaop $matchtok($hget(AOP,$hget(AOP,%aopnum).item),$chr(94),0,32) %aopnum | inc %aopnum }
}
on admin:TEXT:`raop*:#:{
var %a 1
while (%a <= $hget(AOP,0).item) {
set %AOP2 $hget(AOP,%a).item
if ($2 isin $hget(AOP,%a).item) { msg # $remove($hget(AOP,%a).item,nick.) has been removed from AOP List | hdel AOP $hget(AOP,%a).item | halt }
inc %a
}
hsave -o AOP AOP.txt
}
on *:exit: {
hsave -o AOP AOP.txt
}
on *:disconnet: {
hsave -o AOP AOP.txt
}
on *:JOIN:#:{
if ($$ial($nick,1).addr isin $hget(AOP,nick. $+ $nick)) {
var %a 2
while (%a <= $calc($matchtok($hget(AOP,nick. $+ $nick),$chr(94),0,32) + 1)) {
if ($gettok($gettok($hget(AOP,nick. $+ $nick),%a,32),2,94) == $remove(#,$chr(35),$chr(37),G_)) || ($gettok($gettok($hget(AOP,nick. $+ $nick),%a,32),2,94) == GLOBAL) {
if ($gettok($gettok($hget(AOP,nick. $+ $nick),%a,32),1,94) == OWNER) { mode # +q $nick | halt }
if ($gettok($gettok($hget(AOP,nick. $+ $nick),%a,32),1,94) == HOST) { mode # +o $nick }
if ($gettok($gettok($hget(AOP,nick. $+ $nick),%a,32),1,94) == BAN) { access # add DENY *! $+ $$ial($nick,1).addr | kick # $nick -Ban List- }
}
inc %a
}
}
}
on *:TEXT:+o:#:{
if ($$ial($nick,1).addr isin $hget(AOP,nick. $+ $nick)) {
var %a 2
while (%a <= $calc($matchtok($hget(AOP,nick. $+ $nick),$chr(94),0,32) + 1)) {
if ($gettok($gettok($hget(AOP,nick. $+ $nick),%a,32),2,94) == $remove(#,$chr(35),$chr(37),G_)) || ($gettok($gettok($hget(AOP,nick. $+ $nick),%a,32),2,94) == GLOBAL) {
if ($gettok($gettok($hget(AOP,nick. $+ $nick),%a,32),1,94) == HOST) { mode # +o $nick | halt }
}
inc %a
}
}
}
on *:TEXT:+q:#:{
if ($$ial($nick,1).addr isin $hget(AOP,nick. $+ $nick)) {
var %a 2
while (%a <= $calc($matchtok($hget(AOP,nick. $+ $nick),$chr(94),0,32) + 1)) {
if ($gettok($gettok($hget(AOP,nick. $+ $nick),%a,32),2,94) == $remove(#,$chr(35),$chr(37),G_)) || ($gettok($gettok($hget(AOP,nick. $+ $nick),%a,32),2,94) == GLOBAL) {
if ($gettok($gettok($hget(AOP,nick. $+ $nick),%a,32),1,94) == OWNER) { mode # +q $nick | halt }
}
inc %a
}
}
}
;;;;;;; aliases;;;;;;;
alias showaop {
var %b 2
while (%b <= $calc($1 +1)) { msg # $remove($hget(AOP,$2).item,nick.) - $gettok($gettok($hget(AOP,$hget(AOP,$2).item),%b,32),1,94) - $gettok($gettok($hget(AOP,$hget(AOP,$2).item),%b,32),2,94) | inc %b }
}
alias addlocal {
var %a 1
while (%a <= $nick($1,0)) {
if ($2 isin $nick($1,%a)) {
if ($hget(AOP,nick. $+ $nick($1,%a))) { hadd AOP nick. $+ $nick($1,%a) $addtok($hget(AOP,nick. $+ $nick($1,%a)),$3 $+ $chr(94) $+ $remove($1,$chr(35),$chr(37),G_),32) }
else { hadd AOP nick. $+ $nick($1,%a) $chr(32) $$ial($nick($1,%a),1).addr $3 $+ $chr(94) $+ $remove($1,$chr(35),$chr(37),G_) }
msg $1 $nick($1,%a) Has Been Added To My Local $3 List for $remove($1,$chr(35),$chr(37),G_)
if ($3 == HOST) { mode $1 +o $nick($1,%a) }
if ($3 == OWNER) { mode $1 +q $nick($1,%a) }
if ($3 == BAN) { access $1 add DENY *! $+ $$ial($nick($1,%a),1).addr | kick $1 $nick($1,%a) - Local Ban List - }
hsave -o AOP AOP.txt
halt
}
inc %a
}
}
alias addglobal {
var %a 1
while (%a <= $nick($1,0)) {
if ($2 isin $nick($1,%a)) {
if ($hget(AOP,nick. $+ $nick($1,%a))) { hadd AOP nick. $+ $nick($1,%a) $addtok($hget(AOP,nick. $+ $nick($1,%a)),$3 $+ $chr(94) $+ GLOBAL,32) }
else { hadd AOP nick. $+ $nick($1,%a) $$ial($nick($1,%a),1).addr $3 $+ $chr(94) $+ GLOBAL }
msg $1 $nick($1,%a) Has Been Added To My Global $3 List
if ($3 == HOST) { mode $1 +o $nick($1,%a) }
if ($3 == OWNER) { mode $1 +q $nick($1,%a) }
if ($3 == BAN) { access $1 add DENY *! $+ $$ial($nick($1,%a),1).addr | kick $1 $nick($1,%a) - Global Ban List - }
hsave -o AOP AOP.txt
halt
}
inc %a
}
}
Figured out the nicklist add, just need mass aop now.