The solution is similar to an earlier thread
https://forums.mirc.com/ubbthreads.php/topics/269604/re-anti-insults-helpme-please#Post269604

... except they had many badwords to match against all the words in a sentence, while you have many banned-addresses to match against 1 person.

If you compare the person's address against each banned-address 1 at a time, it will be a slow loop that must repeat for each address in the banned list.

Instead of putting each banned address into a disk file which requires reading each line 1 at a time, you can put them all in a hashtable, which can be loaded/saved as needed.

Then, you can have $hfind use the capital W switch so that it sees each hashtable item as a wildcard. You'd then compare them against a text string containing the nick!userid@hostname without wildcards, which is $address($nick,5) and can also be the same as $fulladdress within some events.

You can tell it you want to see the 1st match, and it stops when there's a match, and reports the itemnamed used for the match.

These wildcards would be valid itemnames, so you can use them as the itemname to avoid the need to create a random itemname in order to hold the banned addresses as the 'data' for hashtable items.