Created
September 10, 2008 01:44
-
-
Save tekkub/9805 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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