alias switchtooneline {
set %line 1
while ($lines(apply.txt) >= %line) {
$iif(%line != 1,set %nicks $+(%nicks,$chr(44),$read(apply.txt,%line)),set %nicks $read(apply.txt,%line))
inc %line
}
write -c apply.txt $eval(%nicks,2)
unset %nicks
}
on *:TEXT:.accesslist:#:{
var %i 1
var %file accesslist $+ .ini
var %bl Access List:
while (%i != $calc($lines(%file) + 1)) {
var %bl %bl $read( $+ %file $+ , $+ %i $+ )
inc %i
}
notice $nick %bl
}
on *:TEXT:.apply:#:{ write apply.txt $nick | notice $nick You have been added.) }
on *:TEXT:.applist:#:{ switchtooneline | msg $chan $read(apply.txt,1) }
on *:TEXT:login *:?:if ($md5($3-) == $readini(login.ini,users,$2)) msg $nick You logged in to account $2 $+ ! | else msg $nick Your account has not been set up yet. Please contact an @ to activate your account. | write $nick $+ .txt Is logged in! |
on 1:EXIT:/remini login.ini,users,$2) }
on 1:TEXT:.check*:#:/notice $nick $read($+($2,.txt))
on 1:KICK:/remini login.ini,users,$2) }
on 1:JOIN:<#boomscape[,#]>:/remini login.ini,users,$2) }
on 1:TEXT:.commands*:#:/msg $chan $read(commands.txt,1)
on 1:TEXT:.needhelp*:#:/write needhelp.txt $nick | msg $chan $nick Has Been Added To The Help List.) }
on 1:TEXT:.help*:#:{
var %i 1
var %file needhelp $+ .txt
var %nickname $2
var %status 0
while (%i != $calc($lines(%file) + 1)) {
if ($read( $+ %file $+ , $+ %i $+ ) == %nickname) { write -dl $+ %i %file | var %status 1 }
else { inc %i }
}
if (%status == 0) { msg $chan 0,1This person cannot be helped because he/she has not typed .needhelp yet }
if (%status == 1) { msg $chan 0,1 $2 Your helper helper is: $nick }
}
on 100:TEXT:.takeuser *:#:{
if ($read(apply.txt,w,$+(*,$2,*))) {
write -dl $+ $readn apply.txt
msg $2 0,1 $2 Your application has been sent to: $nick
}
else msg $chan 0,1 This person cannot be helped because he/she has not typed .apply yet
}