From 5e5596821af5111e5f7d2bd86fecaf7f644b3a07 Mon Sep 17 00:00:00 2001 From: shagu Date: Sun, 22 Apr 2018 15:24:18 +0200 Subject: [PATCH] chat: introducing the CLINK Shield convert prat CLINKs into regular itemlinks. http://www.wowhead.com/item=15466 --- modules/chat.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/chat.lua b/modules/chat.lua index 7648d97e..e42fe1bd 100644 --- a/modules/chat.lua +++ b/modules/chat.lua @@ -793,6 +793,11 @@ pfUI:RegisterModule("chat", function () _G["ChatFrame"..i].AddMessage = function (frame, text, a1, a2, a3, a4, a5) if text then + -- Remove prat's CLINK itemlinks. + text = gsub(text, '%{CLINK:(%x%x%x%x%x%x%x%x):(%d*):(%d*):(%d*):(%d*):(.-)%}', function(color, id, enchant, suffix, uuid, name) + return format('|c%s|Hitem:%s:%s:%s:%s|h[%s]|h|r', color, id, enchant, suffix, uuid, name) + end) + -- detect urls if C.chat.text.detecturl == "1" then local URLPattern = pfUI.chat.URLPattern