A Simple script to get your bot to store quotes.
To add a quote: `aq quote
To get quotes: quote or :
quote
It stores the quotes in text file and keeps a different one for each channel on each network.
on 200:text:`aq*:*:{
write $eval($+($chan,.,$network,.,quotes.txt),2) $2-
}
on *:text:`quotes:#:{
msg $Chan Total number of quotes for $chan on $network $+ : $lines($eval($+($chan,.,$network,.,quotes.txt),2))
}
on *:text:`quote*:#:{
if (!$2) {
msg $chan $+ $gettok($read($eval($+($chan,.,$network,.,quotes.txt),2),n),1,32) $+ || $gettok($read($eval($+($chan,.,$network,.,quotes.txt),2),n,$readn),2-,32) (# $+ $readn $+ )
.notice $Nick Alternative Usage: `quote <search term>
}
elseif ($read($eval($+($chan,.,$network,.,quotes.txt),2),nw,* $+ $2- $+ *)) {
msg $chan $+ $gettok($ifmatch,1,32) $+ || $gettok($ifmatch,2-,32) (# $+ $readn $+ )
}
else {
.notice $Nick " $+ $2- $+ " Not Found!
}
}