I didnt overly read everything above but i think your after this
Each time someone says something break it down into parts based on "." (tokenize on "." aka 46) and see if you file has any of them in it, your file lines need to match the front of but not the whole line said in channel.
ex
----- match.txt -----
fred.fries
john.boot
nick.alert.time
blah.blah
----- match.txt -----
fred.fries.1.2.3 [color:blue]MATCH[/color]
fred.fries&cheese [color:blue]NO MATCH[/color]
john [color:blue]NO MATCH[/color]
john.boot [color:blue]MATCH[/color]
nick.alert [color:blue]NO MATCH[/color]
nick.alert.time.now [color:blue]MATCH[/color]
blah.blah.something [color:blue]MATCH[/color]
something.blah.blah [color:blue]NO MATCH[/color]
If this is what its ment to be this should do you.
;
;usage $isin.match.txt(<text>)
;returns $null = no match
;returns N = Line N of match.txt located at front of <text>
;
alias isin.match.txt {
if ($isfile($+($scriptdir,match.txt))) {
if (($file($+($scriptdir,match.txt)).mtime != %match.txt.file.mtime) || (!$hget(match.txt))) {
set -se %match.txt.file.mtime $file($+($scriptdir,match.txt)).mtime
hfree -w match.txt
hmake match.txt
hload -n match.txt match.txt
}
var %c = 1 | while (%c <= $numtok($1,46)) {
if ($hfind(match.txt,$gettok($1,$+(1-,%c),46)).data) { return $v1 }
inc %c
}
}
}
use in side your ON TEXT as per the example below...
if ($isin.match.txt($1-)) { echo -a MATCHED to line number $v1 }
** incase you want to know what its doing **
checks if the file exists,
then checks if the file has changed since the last time it was read into the hash table, or if the hash tables been deleted
then saves the last modified time of the file, and remakes the hashtable loading it with the file
then it takes the first token of the $1- (now all in $1) and looks for it in the hash table, if it finds it it returns with that value other wise gets the next token as well and checks again
keeps that up till it has compared the whole line and found no match, thus ends (any ending with out a RETURN returns $null)