Skip to content

Instantly share code, notes, and snippets.

@tekkub
Created September 10, 2008 01:44
Show Gist options
  • Select an option

  • Save tekkub/9805 to your computer and use it in GitHub Desktop.

Select an option

Save tekkub/9805 to your computer and use it in GitHub Desktop.
local mypatch, mybuild = "3.0.2", "8905"
local version, build = GetBuildInfo()
if version ~= mypatch or build ~= mybuild then
return ChatFrame1:AddMessage("|cFF33FF99ChatLinkFix|r: This addon is only designed to work with patch "..mypatch.." build "..mybuild..
". If the bug is not fixed, please check for an updated version.")
end
local orig = ChatFrame_OnHyperlinkShow
function ChatFrame_OnHyperlinkShow(self, link, text, button, ...)
local linkType, linkvalue = string.split(":", link)
if linkType == "item" and IsModifiedClick("DRESSUP") then return DressUpItemLink(linkvalue) end
if not IsModifiedClick("CHATLINK") then return orig(self,link, text, button, ...) end
if linkType == "player" then return ChatFrameEditBox:IsVisible() and ChatEdit_InsertLink(linkvalue) or SendWho(linkvalue) end
if linkType == "spell" then text = GetSpellLink(linkvalue) end
ChatFrameEditBox:Show()
ChatEdit_InsertLink(text)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment