what was changed in thjis following code that broke it?
-- fill auctionStrings with pattern matches for auction events
auctionStrings = {}
for k,v in pairs({
-- delete any lines here you don't want redirected
--ERR_AUCTION_HIGHER_BID,
--ERR_AUCTION_BOUND_ITEM,
--ERR_AUCTION_ITEM_HAS_QUOTE,
ERR_AUCTION_EXPIRED_S,
--ERR_AUCTION_LIMITED_DURATION_ITEM,
--ERR_AUCTION_HOUSE_UNAVAILABLE,
--ERR_AUCTION_CONJURED_ITEM,
--ERR_AUCTION_HOUSE_DISABLED,
--ERR_AUCTION_QUEST_ITEM,
--ERR_AUCTION_ALREADY_BID,
ERR_AUCTION_OUTBID_S,
ERR_AUCTION_SOLD_S,
--ERR_AUCTION_REPAIR_ITEM,
--ERR_AUCTION_DATABASE_ERROR,
--ERR_AUCTION_BAG,
--ERR_AUCTION_ENOUGH_ITEMS,
ERR_AUCTION_WON_S,
ERR_AUCTION_REMOVED_S,
--ERR_AUCTION_HOUSE_BUSY,
--ERR_AUCTION_WRAPPED_ITEM,
}) do
v = v:gsub("%.","%%."):gsub("%%s",".-")
tinsert(auctionStrings,v)
end
-- returns the Auctions temporary chat tab if it exists
-- if create is true, creates one if needed
local function getAuctionTab(create)
-- look for existing tab with "Auctions" as a name
for _,name in pairs(CHAT_FRAMES) do
local frame = _G[name]
if frame.name == "AH" then
return frame
end
end
-- none found
--if create then
-- local frame = FCF_OpenTemporaryWindow("SYSTEM")
-- FCF_SetWindowName(frame,tabName)
-- return frame,true
--end
end
-- returns true if msg matches any of the known auctionStrings
local function hasAuctionText(msg)
for i=1,#auctionStrings do
if msg:match(auctionStrings[i]) then
return true
end
end
end
-- this chat filter only runs for CHAT_MSG_SYSTEM
local function filter(self, event, msg, ...)
if hasAuctionText(msg) then
local auctionTab,justCreated = getAuctionTab(true)
--if self==auctionTab then
if self:GetName() == getAuctionTab():GetName() then
return false,msg,... -- pass auction chats to auction tab
else -- auction chat going to non-auction tab
if justCreated then
-- if just created an auction tab, manually add the creating auction message
local color = ChatTypeInfo["SYSTEM"]
auctionTab:AddMessage(msg,color.r,color.g,color.b)
end
return true -- suppress auction chats to non-auction tabs
end
elseif self==getAuctionTab() then
return true -- suppress non-auction chats to auction tab
end
-- everything else pass as if nothing happened
return false,msg,...
end
-- create filter
ChatFrame_AddMessageEventFilter("CHAT_MSG_SYSTEM",filter)