Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local MyFilterAddon = CreateFrame'Frame'
- local function myChatFilter(self,event,arg1,...)
- if arg1:find("Выносливость") then
- return false, gsub(arg1, "Выносливость", "123"), ...
- end
- -- if arg1:find("green") then
- -- return false, gsub(arg1, "green", "blue"), ...
- -- end
- end
- function MyFilterAddon:PLAYER_LOGIN()
- ChatFrame_AddMessageEventFilter("CHAT_MSG_CHANNEL", myChatFilter)
- ChatFrame_AddMessageEventFilter("CHAT_MSG_SAY", myChatFilter)
- ChatFrame_AddMessageEventFilter("CHAT_MSG_YELL", myChatFilter)
- ChatFrame_AddMessageEventFilter("CHAT_MSG_WHISPER", myChatFilter)
- end
- MyFilterAddon:RegisterEvent'PLAYER_LOGIN'
- MyFilterAddon:SetScript('OnEvent', function(self, event, ...)
- return self[event](self, event )
- end)
Add Comment
Please, Sign In to add comment