In one of my previous notes, I was warned about people being able to abuse the (%*) parameter to make me quit etc.
This is a complicated pattern, I was wondering if you can see any ways of abusing it? (it will wrap but it is one pattern)
^(*) {tells you|replies|whispers to you|says|asks|asks you|
snarls|sings|joiks|teases you for}{: | }(*){ |}$
The match on (*) instead of (%w) at the beginning is to catch the intermittent > and [E]: that sometimes appear at the beginning of the line, sometimes only one of them, sometimes both together.
I extract a player name from (*) like this:
#VARIABLE healname %word( %trim( %remove( ">", %remove( "[E]:", %lower( %1)))), 1)
The match of (*) instead of (%w) at the end is because sometimes people say 'heal' sometimes 'heal 15' and sometimes 'heal me please' so I just want to match the first word in the rest of the line, but I also want to match the line end, and also there is sometimes a space beore the line end.
I simply extract healtype from (*) like this:
#VARIABLE healtype %lower( %word( %2, 1))
The reason for the ^ and $ patterns is to stop the match on a multiline tell statement.
Thanks very much,
Steve :)