diff --git a/api/config.lua b/api/config.lua index 8541fafc..fc7bd47b 100644 --- a/api/config.lua +++ b/api/config.lua @@ -180,12 +180,12 @@ function pfUI:LoadConfig() pfUI:UpdateConfig("chat", "right", "alwaysshow", "0") pfUI:UpdateConfig("chat", "right", "width", "380") pfUI:UpdateConfig("chat", "right", "height", "180") - pfUI:UpdateConfig("chat", "global", "tabdock", "1") + pfUI:UpdateConfig("chat", "global", "tabdock", "1") pfUI:UpdateConfig("chat", "global", "custombg", "0") pfUI:UpdateConfig("chat", "global", "background", ".2,.2,.2,.5") pfUI:UpdateConfig("chat", "global", "border", ".4,.4,.4,.5") pfUI:UpdateConfig("chat", "global", "whispermod", "1") - pfUI:UpdateConfig("chat", "global", "whisper", "1,.6,1,1") + pfUI:UpdateConfig("chat", "global", "whisper", "1,.7,1,1") pfUI:UpdateConfig("chat", "global", "sticky", "1") pfUI:UpdateConfig("chat", "global", "fadeout", "0") pfUI:UpdateConfig("chat", "global", "fadetime", "300") diff --git a/modules/chat.lua b/modules/chat.lua index 99973b0c..8fc09064 100644 --- a/modules/chat.lua +++ b/modules/chat.lua @@ -634,24 +634,24 @@ pfUI:RegisterModule("chat", function () ChatFrameEditBox:SetAltArrowKeyMode(false) local default = " " .. "%s" .. "|r:" .. "\32" - CHAT_CHANNEL_GET = "%s" .. "|r:" .. "\32" - CHAT_GUILD_GET = '[G]' .. default - CHAT_OFFICER_GET = '[O]'.. default - CHAT_PARTY_GET = '[P]' .. default - CHAT_RAID_GET = '[R]' .. default - CHAT_RAID_LEADER_GET = '[RL]' .. default - CHAT_RAID_WARNING_GET = '[RW]' .. default - CHAT_BATTLEGROUND_GET = '[BG]' .. default - CHAT_BATTLEGROUND_LEADER_GET = '[BL]' .. default - CHAT_SAY_GET = '[S]' .. default + _G.CHAT_CHANNEL_GET = "%s" .. "|r:" .. "\32" + _G.CHAT_GUILD_GET = '[G]' .. default + _G.CHAT_OFFICER_GET = '[O]'.. default + _G.CHAT_PARTY_GET = '[P]' .. default + _G.CHAT_RAID_GET = '[R]' .. default + _G.CHAT_RAID_LEADER_GET = '[RL]' .. default + _G.CHAT_RAID_WARNING_GET = '[RW]' .. default + _G.CHAT_BATTLEGROUND_GET = '[BG]' .. default + _G.CHAT_BATTLEGROUND_LEADER_GET = '[BL]' .. default + _G.CHAT_SAY_GET = '[S]' .. default local cr, cg, cb, ca = strsplit(",", C.chat.global.whisper) cr, cg, cb = tonumber(cr), tonumber(cg), tonumber(cb) local wcol = string.format("%02x%02x%02x",cr * 255,cg * 255, cb * 255) if C.chat.global.whispermod == "1" then - CHAT_WHISPER_GET = '|cff' .. wcol .. '[W]' .. default - CHAT_WHISPER_INFORM_GET = '[W]' .. default + _G.CHAT_WHISPER_GET = '|cff' .. wcol .. '[W]' .. default + _G.CHAT_WHISPER_INFORM_GET = '[W]' .. default end CHAT_YELL_GET = '[Y]' .. default @@ -688,13 +688,6 @@ pfUI:RegisterModule("chat", function () text = string.gsub(text, "|Hplayer:(.-)|h%[.-%]|h(.-:-)", "[|Hplayer:%1|h" .. Name .. "|h]" .. "%2") end - if C.chat.global.whispermod == "1" then - -- patch incoming whisper string to match the colors - if string.find(text, '|cff'..wcol, 1) == 1 then - text = string.gsub(text, "|r", "|cff" .. wcol) - end - end - local pattern = "%]%s+(.*|Hplayer)" local channel = string.gsub(text, ".*%[(.-)" .. pattern ..".+", "%1") if string.find(channel, "%d+%. ") then @@ -714,6 +707,13 @@ pfUI:RegisterModule("chat", function () text = "|c" .. chex .. left .. date(C.chat.text.timeformat) .. right .. "|r " .. text end + if C.chat.global.whispermod == "1" then + -- patch incoming whisper string to match the colors + if string.find(text, '|cff'..wcol, 1) == 1 then + text = string.gsub(text, "|r", "|cff" .. wcol) + end + end + _G["ChatFrame"..i].HookAddMessage(frame, text, unpack(arg)) end end