if ($2 !isnum) {
window -h @quote.search
loadbuf -r @quote.search quotes.txt
var %quote.temp $fline(@quote.search,$+(*,$2-,*),0)
if (%quote.temp isnum 1-20) {
var %i = 1,%quote.match
while ($fline(@quote.search,$+(*,$2-,*),%i)) {
%quote.match = $addtok(%quote.match,$v1,44)
inc %i
}
msg $chan Matches for $2 --> %quote.match
window -c @quote.search
}
elseif (%quote.temp == 0) { msg $chan No match found. }
else { msg $chan More than 20 matches found, please narrow your search down }
}