I'm writing a script that allows the user to add "highlight" words to a file that the client then looks for in the channel chat, alerting the user when a "highlight" word is mentioned.

The reason I'm doing this, instead of using the mIRC highlight feature, is that I'm including some options that can be set on a "per word" basis, that mIRC doesn't cater for.

It finds partial matches fine, like if a user added "test" to the file, the script would find "this is a test" and "I'm testing something" but what I want it to do is match on the whole word only. So if they have "test" in their file, the script would only trigger on "test" and not "testing" or "fastest".

The line I'm using is:

Code:
if ($ini($scriptdirHighlights.ini,%highlightword) isin $strip($1-)) || ($ini($scriptdirHighlights.ini,%highlightword) == $strip($1)) {

I put the "||" in there to catch a "highlight" word when its seen in the channel as the first word of a sentence,because then there wouldn't be space in front of it. I don't know if its needed if I could code this properly.

I've tried variations of:

Code:
($chr(32) $+ $ini($scriptdirHighlights.ini,%highlightword) $+ $chr(32))

and after failing to find any answers on this forum, or online, I also tried

Code:
($chr(32) [ $+ [ $ini($scriptdirHighlights.ini,%highlightword) ] $+ ])

Which is probably horribly wrong, but I'm utterly out of ideas, and knowledge.

This is the last hurdle that I have to get over before my script is completed. Please can someone show me how to do this?

Thanks

Panda

Sorry about the terrible subject title, I just couldn't work out how to describe my problem in a few words.

Last edited by Panda; 24/02/15 06:34 PM. Reason: Edited to try and make my question more clear