There are two main tools to parse/match text with mIRC, wildcard expressin or regular expression (regex)
A wildcard expression is just a string where the '?' matches one character, '*' match zero or more characters and '&' will match a whole word (in fact, a space seperated token).
Regex allows you to handle very complex situation very easily and that's what you're going to use.
A regular expression is just a string where some characters/sequences has some meaning (it's a bit like a new language so I'm not going to explain in depth).
Unlike wildcard expressions where we only talk about matching characters, regex allow you to match positions as well.
For example \b is an anchor and matches a position at word boundaries, there are three different positions that qualify as word boundaries:
-before the first character in the string, if the first character is a word character.
-after the last character in the string, if the last character is a word character.
-between two characters in the string, where one is a word character and the other is not a word character.
So \bword\b would match any word that is "word", even if "word" is touching punctuation for example.
If you have on *:text:hello:#: -- "hello" is a wildcard expression here, matching on the exact string "hello"
If you have on *:text:*hello*:#: it's still a wildcard expression, and it matches the same as if (hello isin $1-), meaning that it matches if "hello" appears anywhere in the string
If you have on *:text: hello :#: it's still a wildcard expression but this time you're requiring a space to be there before and after the string hello (would fail on a simple string like "hello there")
Now you have on $*:text:/\bhello\b/:#:
The $ is the regular expression event prefix, meaning we want to use that tool, and the / around the expression are delimiters (which is usually /)
And as I said, this will match a real "hello" word, it won't fail on "hello there" or on "hello's the thing to say when you join" for example.
read more about regular expression: http://www.regular-expressions.info/tutorial.html
As for warning CAPS, people usually check how many percent of CAPS there are in the sentence. There are different ways to do it according to how you want to represent the % of CAPS, a basic way is to compare the length of the string ( $len() ) and compare it to the total number of uppercase letters
Two example with the string "FlOOdIng WITH Caps"
$len() = 18
# of CAPS = 9
9*100/18 = 50% so with this method, half the sentence is using uppercase letter.
Now what if the string is "WLDKFLSDZEDZEF!!!!!!!!!!!!!!!!!!!!!!!!!!"
$len() = 40
# of CAPS = 14
14*100/40 = 35%, thought you might want to consider that this is almost 100% since the rest is just non-letter.
My point is that you would have to change the way you get the %percent if you want to account for those kind of things.