alias lsb_chk_lst {
var %lsb.time = $ticks
set %lsb=list %lsb_list
set %lsb_list 0
set %lsb.file $+(*,$replace(%lsb.temp,$chr(32),*,_,*,-,*,?,*),*)
if ((%lsb.file == ***) || (!$len(%lsb.temp))) {
msg $nick 12 No search string was entered
if ($ifmatch == ***) msg $nick 12Try again
[color:#840017]HALT[/color]
}
var %lsb.sflnm = $+(%,lsb_rslt_dir,Result_,$replace(%lsb.file,*,_),.txt)
var %lsb.cnt = 1
while ($findfile(%lsb_lst_dir,*.txt,%lsb.cnt)) {
var %lsb.flnm = $ifmatch
if ($left($nopath(%lsb.flnm),7) != Result_) {
filter -ff %lsb.flnm %lsb.sflnm * $+ %lsb.file $+ *
if (%lsb.sflnm) write %lsb.sflnm $chr(10)
}
inc %lsb_list 1
}
var %lsb.fcnt = $lines(%lsb.sflnm)
if ((!%lsb.fcnt) || (%lsb.fcnt < 13)) {
msg $nick 2 L12ist 2S12earch 2B12ot Found4 NO12 matches for4 %lsb.temp $+ 2....
msg $nick 12 Try a different spelling of4 %lsb.temp $+ 2....
.remove %lsb.send.flnm
unset %lsb.send.flnm
[color:#840017]HALT[/color]
}
set %lsb.flnm %lsb.sflnm
%lsb.fcnts = %lsb.fcnt - 12
set %lsb.send.flnm %lsb.sflnm
%lsb.time = $calc($timezone + (($ticks - %lsb.time) / 1000 ))
msg $nick 2 L12ist 2S12earch 2B12ot Found 2[4 %lsb.fcnts 2] $&
12matches for4 %lsb.temp 12in 2[04 $+($asctime($int(%lsb.time),n:ss),$gettok(%lsb.time,2,46)) 2]
msg $nick 2 L12ist 2S12earch 2B12ot will now Dcc you a list of its findings2....
$lsb.send
}
[/color]