A simple script hand allows a person to add a quote ,Read a quote either at random, or by quote number, Delete a quote, and to see the total number of quotes. the script uses access levels . To add or delete a quote the user must be at level 10. This can be changed by changing : on 10:TEXT: to a different number
on 1:TEXT:?totalquotes:#: { msg $chan The Total quotes that I have is $lines(C:\quote.txt)
}
on 10:TEXT:?addquote *:#: /write C:\quote.txt <Quote> $2-302 ***added by $nick on $date at $time *** | msg $chan <Quote> $2-102 ***by $nick on $date at $time *** added to Quotes
on 1:TEXT:?quote:#: /msg $chan $read C:\quote.txt Qoute(s) shown at random
on 1:TEXT:?quote*:#: { if (!$2) { msg # $read(C:\quote.txt)
}
elseif ($2) && ($2 isin $read(C:\quote.txt,$2)) {
msg # Quote $2 : $read(C:\quote.txt,$2)
}
elseif ($2 !isin $read(C:\quote.txt,$2)) {
msg # Quote not found! Please try another number!
}
}
on 10:TEXT:?delquote *:#: { write -dl $2 C:\quote.txt | msg $chan Quote $2 has been deleted from Quotes
}
}