From 1f680ecfefe6f7fcbed001a6d58d3a793126e822 Mon Sep 17 00:00:00 2001 From: Xruptor Date: Sun, 14 Oct 2012 10:19:07 -0400 Subject: [PATCH] -Fixed a stupid taint issue with removing glyphs. Why does blizzard keep adding taint calls to functions, in every expansion. --- XanChat.lua | 28 ++++++++-------------------- XanChat.toc | 2 +- 2 files changed, 9 insertions(+), 21 deletions(-) diff --git a/XanChat.lua b/XanChat.lua index 7adfddf..8c32dac 100644 --- a/XanChat.lua +++ b/XanChat.lua @@ -146,24 +146,13 @@ StaticPopupDialogs["LINKME"] = { maxLetters = 255, } -function xanChat_URLRef(link, text, button) - if (strsub(link, 1, 3) == "url") then +local SetHyperlink = _G.ItemRefTooltip.SetHyperlink +function _G.ItemRefTooltip:SetHyperlink(link, ...) + if link and (strsub(link, 1, 3) == "url") then local url = strsub(link, 5) - - -- local activeWindow = ChatEdit_GetActiveWindow() - - -- if ( activeWindow ) then - -- activeWindow:Insert(url) - -- ChatEdit_FocusActiveWindow() - -- else - -- ChatEdit_GetLastActiveWindow():Show() - -- ChatEdit_GetLastActiveWindow():Insert(url) - -- ChatEdit_GetLastActiveWindow():SetFocus() - -- end - local dialog = StaticPopup_Show("LINKME") - local editbox = _G[dialog:GetName().."EditBox"] + editbox:SetText(url) editbox:SetFocus() editbox:HighlightText() @@ -172,13 +161,12 @@ function xanChat_URLRef(link, text, button) button:ClearAllPoints() button:SetPoint("CENTER", editbox, "CENTER", 0, -30) - else - SetItemRef_orig(link, text, button) - end + return + end + + SetHyperlink(self, link, ...) end -SetItemRef = xanChat_URLRef - ChatFrame_AddMessageEventFilter("CHAT_MSG_BATTLEGROUND_LEADER", urlFilter) ChatFrame_AddMessageEventFilter("CHAT_MSG_BN_CONVERSATION", urlFilter) ChatFrame_AddMessageEventFilter("CHAT_MSG_BN_WHISPER", urlFilter) diff --git a/XanChat.toc b/XanChat.toc index 658266e..0eafc23 100644 --- a/XanChat.toc +++ b/XanChat.toc @@ -2,7 +2,7 @@ ## Title: xanChat ## Notes: A very minimalistic chat modification addon. ## Author: Xruptor -## Version: 3.5 +## Version: 3.6 ## SavedVariables: XCHT_DB xanChat.lua -- 1.7.9.5