this is what i’ve been using for a few years,it makes all ah msg be dirrected to a specific chat pane
to use it do the following
put this in AuctionHouseMessages.toc
## Interface: 70100
## Title: AuctionHouseMessages
code.lua
and put this in code.lua
-- This file is loaded from "AuctionHouseMessages.toc"
-- this addon will redirect auction system messages to a temporary
-- chat tab named "AH"
local tabName = "AH" -- name for temporary tab
-- 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_EXPIRED_S, -- "Your auction of %s has expired."
ERR_AUCTION_OUTBID_S, -- "You have been outbid on %s."
ERR_AUCTION_REMOVED_S, -- "Your auction of %s has been cancelled by the seller."
ERR_AUCTION_SOLD_S, -- "A buyer has been found for your auction of %s."
ERR_AUCTION_WON_S, -- "You won an auction for %s"
ERR_AUCTION_BID_PLACED, -- "Bid accepted."
ERR_AUCTION_REMOVED, -- "Auction cancelled."
ERR_AUCTION_STARTED, -- "Auction created."
}) 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 == tabName 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)
place them both ina folder named AuctionHouseMessages in wow
interface\addons\
finaly create a chat pane names ‘AH’ select only system messages for that chat pane
walla