on *:TEXT:@find *:#:{
if (% [ $+ [ $nick ] $+ .find ] == $nick) { return }
set -u60 % $+ $nick $+ .find $nick
var %lsearch $+(*,$replace($2-,$chr(32),$chr(42)),*)
var %found $hfind(filelist,* $+ %lsearch $+ *,0,w).data
if (%found != 0) {
if (%found >= 5) { var %hfound 5 }
else var %hfound $hfind(filelist,* $+ %lsearch $+ *,0,w).data
var %tfound %hfound
.notice $nick 0,2Am Sending You The Results Of Your Query For: %lsearch
while %hfound > 0 {
.timerfind $+ $nick $+ . $+ %hfound 1 $calc(%hfound * 3) .notice $nick ! $+ $me $&
$nopath($hget(filelist,$hfind(filelist,* $+ %lsearch $+ *,%hfound,w).data))
dec %hfound
}
.timerfind $+ $nick $+ . $+ final 1 $calc(%tfound * 3 + 3) .notice $nick 0,2 $iif(%found < 5,I have finished $&
Sending You %tfound results from your search for: %lsearch,I have more than 5 results for %lsearch please be $&
more specific or try grabbing my list: $+(@,$me))
}
else .notice $nick 0,2Sorry $nick, i dont have any files matching %lsearch
}