Originally Posted by Lesteryoung
It clears the combat for about a second, and then the data just repopulates instantly.
And if you have the combat log targeted and /clear, it clears all other windows as well.
So far MunkDev's code has worked the best, in that it only clears selected windows, but among them can't be the combat log for some reason.
|
Here you go
Code:
SLASH_CLEARCHAT1 = "/clear"
SLASH_CLEARCHAT2 = "/clearchat"
SlashCmdList.CLEARCHAT = function(cmd)
cmd = cmd and strtrim(strlower(cmd))
for i = 1, NUM_CHAT_WINDOWS do
local f = _G["ChatFrame"..i]
if f:IsVisible() or cmd == "all" then
f:Clear()
end
end
end
I tested this window by window and this is what you are looking for 100%
Credits to Phanx / PhanxChat
https://github.com/Phanx/PhanxChat/b.../Core.lua#L273