Just as a note, from your original script for your original text file of data, you can just do this:
on 1:text:!search *:#mychannel:{
var %lines = $lines(database.txt)
var %currentline = 1
var %total = 0
while (%currentline <= %lines) {
var %data = $read(database.txt,w,$2 $+ *,%currentline)
if (%data != $null) {
msg #mychannel %data
inc %total
}
var %currentline = $calc($readn + 1)
}
msg $mychannel %total found.
}
Using the 4th parameter (a line number) in $read, lets you continue your search starting from a specific line. $readn tells you the most recent line you $read. So, adding 1 to that in your loop will let you continue on.