on *:text:!quote*:*: {
if ($level($address($nick,8)) == Quote.Ban) { return }
else var %who = $nick
if ($chan) {
if (!$istok([color:red]#channel1 #channel2 #channel3 #channel4 #channel5[/color],$chan,32)) { return }
var %who = $chan
if (%quote.delay) {
.notice $nick Please try again after $duration(%quote.delay) or use !quote in a PM.
return
}
else {
var %delay = $rand([color:blue]600,5400[/color])
set -u [ $+ [ %delay ] ] %quote.delay %delay
}
}
if ($2) {
if ($2 !isnum) { msg %who $2 is not a number. | return }
if ($lines(quotes.txt) < $2) { msg %who Quote # $+ $2 doesn't exist. | return }
msg %who $read(quotes.txt,$2)
}
elseif ($1 == !quotes) { msg %who Total quotes: $lines(quotes.txt) }
else msg %who $read(quotes.txt)
}
on *:text:!addquote*:*: {
if ($2 == $null) { .notice $nick You need to include a quote to add. }
else write quotes.txt $2-
}
menu nicklist {
!Quote Ban: auser Quote.Ban $address($snick($chan,1),8)
}