mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-26 22:00:49 +00:00
chatcopy: only add line when msg exists
This commit is contained in:
@@ -132,10 +132,10 @@ pfUI:RegisterModule("chatcopy", function ()
|
|||||||
local history = {}
|
local history = {}
|
||||||
local AddMessage = frame.AddMessage
|
local AddMessage = frame.AddMessage
|
||||||
frame.AddMessage = function(self,msg,r,g,b)
|
frame.AddMessage = function(self,msg,r,g,b)
|
||||||
if r and g and b then
|
if msg and r and g and b then
|
||||||
local col = string.format("|cff%02x%02x%02x", r*255, g*255, b*255)
|
local col = string.format("|cff%02x%02x%02x", r*255, g*255, b*255)
|
||||||
table.insert(history, 1, col..string.gsub(msg, "|r", col))
|
table.insert(history, 1, col..string.gsub(msg, "|r", col))
|
||||||
else
|
elseif msg then
|
||||||
table.insert(history, 1, "|cffffffff"..msg)
|
table.insert(history, 1, "|cffffffff"..msg)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user