Thread: |h?
View Single Post
05-09-19, 04:54 AM   #4
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,323
Originally Posted by JDoubleU00 View Post
What does the |H do? Look for hyperlinks? I was trying to find documentation, but my GoogleFu is weak, any pointers there would be appreciated also.

Code:
ChatFrame_AddMessageEventFilter("CHAT_MSG_CHANNEL", function(_, _, message, _, _, _, _, _, _, _, channel)
    if channel == "Trade - City" and not message:find("|H") then
        return true
    end
end)
In short, what this code is doing is registering a filter to check if a message in trade chat contains a link. If it doesn't find one, it tells the ChatFrame to ignore the message. It's crude and easily defeated by anyone that actually types "|H" in chat, which will be read in as "||H".
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 05-09-19 at 04:57 AM.
  Reply With Quote