Originally Posted by semlar
The error is from 'local f = _G["ChatFrame" .. i])' having an extraneous parentheses at the end, but I don't think phanx's script is going to do anything mine didn't do for you, it's just a different way of doing more or less the same thing.
If I'm understanding you correctly it's removing the realm from their name in the chat window when they send you a whisper, but you want it to also remove it from the left side of the chat box when you're sending a tell to someone.
Alright, I threw something together that I think should do what you're after.
Lua Code:
hooksecurefunc('ChatEdit_UpdateHeader', function(editBox) local header = _G[editBox:GetName() .. 'Header'] if editBox:GetAttribute('chatType') == 'WHISPER' and header then _G[editBox:GetName() .. 'HeaderSuffix']:Hide() header:SetWidth(0) header:SetFormattedText(CHAT_WHISPER_SEND, (strsplit('-', editBox:GetAttribute('tellTarget')))) editBox:SetTextInsets(15 + (header:GetRight() or 0) - (header:GetLeft() or 0), 13, 0, 0) end end)
|
Brilliant! This is exactly what I wanted, seems to filter everything now, except the realm names in system messages. i.e. "Gryns-Aggramar has entered the raid" I know I'm nitpicking, but is that possible as well?
Also, I added this to the code of your other addon, NoRealm, but that didn't seem to work. It only seemed to work when I enabled it as a separate addon, how can I merge the two?
Thanks again, really.
Joey