rendered paste bodyon *:join:#team7:{
if ($nick != $me) {
var %x = 1, %total = $lines(users.txt)
while (%x <= %total) {
if ($nick == $read(users.txt,%x)) { mode # +o $nick }
inc %x
}
}
elseif ($nick == $me) {
var %x = 1, %total = $nick(#,0)
while (%x <= %total) {
var %nick = $nick(#,%x)
if (%nick !isop #) && ($read(users.txt, s, %nick)) {
mode # +o %nick
}
inc %x
}
}
}
on *:op:#team7:{
var %x = 1, %total = $lines(users.txt)
while (%x <= %total) {
if ($opnick == $read(users.txt,%x)) { set %op.nick true }
inc %x
}
set %nick.op $opnick
verificar-op
}
alias verificar-op {
if (%op.nick != true) { mode # -o %nick.op | set %op.nick false | halt }
else { set %op.nick false | halt }
}
on *:text:!up:#team7:{
var %x = 1, %total = $lines(users.txt)
while (%x <= %total) {
if ($nick == $read(users.txt,%x)) { mode # +o $nick }
inc %x
}
}
on *:text:!op*:#team7:{
var %x = 1, %total = $lines(users.txt)
while (%x <= %total) {
if ($2 == $read(users.txt,%x)) { mode # +o $2 }
inc %x
}
}
on 1000:text:+add*:#team7:{
write users.txt $2
notice $nick $2 adicionado á lista de OP's.
}
on 1000:text:+rem*:#team7:{
var %x = 1, %total = $lines(users.txt)
while (%x <= %total) {
if ($2 isin $read(users.txt,%x)) {
mode # -o $2
write -d $+ %x users.txt
notice $nick $2 removido da lista de OP's.
}
inc %x
}
}