Thread: Reverse string
View Single Post
12-26-21, 05:25 PM   #5
abel8909
A Murloc Raider
Join Date: Jan 2021
Posts: 4
Originally Posted by Kanegasi View Post
Lua Code:
  1. ChatFrame_AddMessageEventFilter("CHAT_MSG_BG_SYSTEM_ALLIANCE",function(_,_,msg,...)
  2.     msg=msg:gsub(" If left unchallenged, the Alliance will control it in 1 minute!","")
  3.     return nil,msg,...
  4. end)
Thank you very much for answering, if it works and excuse my ignorance, how can I make a list to filter several messages? I did something like that but it doesn't work

Lua Code:
  1. ChatFrame_AddMessageEventFilter("CHAT_MSG_BG_SYSTEM_ALLIANCE",function(_,_,msg,...)
  2.     msg=msg:gsub(" If left unchallenged, the Alliance will control it in 1 minute!"," control it in 1 minute!")
  3.     msg=msg:gsub("The Horde Flag was picked up by ","The Horde Flag was captured by ")
  4.     return nil,msg,...
  5. end)
  Reply With Quote