Modules/Chat: Ignore bad chat notices

This commit is contained in:
andrew6180
2024-10-28 08:18:15 -07:00
parent 16c31e2340
commit 6d74de6c27
+5 -1
View File
@@ -1084,7 +1084,7 @@ function CH:ChatFrame_MessageEventHandler(frame, event, arg1, arg2, arg3, arg4,
frame:AddMessage(format(globalstring, arg8, arg4, arg2), info.r, info.g, info.b, info.id, false, nil, nil, isHistory, historyTime)
end
elseif chatType == "CHANNEL_NOTICE" then
if arg1 == "NOT_IN_LFG" then return end
if arg1 == "NOT_IN_LFG" or string.isNilOrEmpty(arg1) then return end
local globalstring = _G["CHAT_"..arg1.."_NOTICE_BN"]
if not globalstring then
globalstring = _G["CHAT_"..arg1.."_NOTICE"]
@@ -1093,6 +1093,10 @@ function CH:ChatFrame_MessageEventHandler(frame, event, arg1, arg2, arg3, arg4,
arg4 = arg4.." "..arg10
end
if not globalstring then
return
end
local accessID = ChatHistory_GetAccessID(Chat_GetChatCategory(chatType), arg8)
local typeID = ChatHistory_GetAccessID(infoType, arg8)
frame:AddMessage(format(globalstring, arg8, arg4), info.r, info.g, info.b, info.id, false, accessID, typeID, isHistory, historyTime)