mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-31 16:06:57 +00:00
Add an option to show timestamps in chat copy
"Show Timestamps In Chat Copy" (chat text settings, on by default) is read each time chat copy opens. With it off, chat copy takes each line through pfUI.chat.StripTimestamp, which removes the exact timestamp AddMessage prepends: the configured color and brackets, so other bracketed text stays. Whispers are now recolored before the timestamp goes on, not after. The recolor turned the stamp's closing "|r " into "|r" plus the whisper color, so whisper lines did not match. The shown text and the saved history come out the same.
This commit is contained in:
@@ -75,6 +75,9 @@ pfUI:RegisterModule("chatcopy", function ()
|
||||
local lines = {}
|
||||
for index=1, frame:GetNumMessages() do
|
||||
local text, r, g, b = frame:GetMessageInfo(index)
|
||||
if C.chat.text.copytime == "0" then
|
||||
text = pfUI.chat.StripTimestamp(text)
|
||||
end
|
||||
local color = rgbhex(r, g, b)
|
||||
table.insert(lines, color .. text:gsub("|r", color))
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user