View Single Post
09-27-15, 06:55 AM   #18
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
Without seeing exactly what it isn't working with I'm just taking a stab in the dark.

My best guess is it's putting some form of punctuation after the person's name.

If you aren't concerned about it potentially matching something that isn't a name, you can just remove both %f[] patterns from the string and it would match anything that looks like "Name-Realm", regardless of what's around it, otherwise you can try this, which should cover any punctuation.

Lua Code:
  1. ChatFrame_AddMessageEventFilter('CHAT_MSG_TEXT_EMOTES', function(self, event, msg, ...)
  2.     return false, (msg:gsub('%f[^%z%s"]([^\1-\64\91-\96\123-191]+)%-%u%l%a+%f[%z%s".,!?\']', '%1')), ...
  3. end)
  Reply With Quote