not tested, but should work wink

replace
Code:
if ($2 !isnum) { msg %who $2 is not a number. | return }

with
Code:
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 }
}


should work as expected

it will show the result if number of matches does not exceed 20
if you wanna change that, change isnum 1-20 to 1-30 or whatever and also change the number in the last else line