From 051fec509ceecfbb976719e6222356906fdee16c Mon Sep 17 00:00:00 2001 From: shagu Date: Thu, 14 Mar 2019 18:23:33 +0100 Subject: [PATCH] chatcopy: only add line when msg exists --- modules/chatcopy.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/chatcopy.lua b/modules/chatcopy.lua index 378f832f..10b1628a 100644 --- a/modules/chatcopy.lua +++ b/modules/chatcopy.lua @@ -132,10 +132,10 @@ pfUI:RegisterModule("chatcopy", function () local history = {} local AddMessage = frame.AddMessage 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) table.insert(history, 1, col..string.gsub(msg, "|r", col)) - else + elseif msg then table.insert(history, 1, "|cffffffff"..msg) end