diff --git a/2/3/4/5/6/7/ElvUI/Modules/Chat/Chat.lua b/2/3/4/5/6/7/ElvUI/Modules/Chat/Chat.lua index 8539dc3..4254f80 100644 --- a/2/3/4/5/6/7/ElvUI/Modules/Chat/Chat.lua +++ b/2/3/4/5/6/7/ElvUI/Modules/Chat/Chat.lua @@ -85,63 +85,6 @@ local hyperlinkTypes = { ["talent"] = true, } -local smileyPack = { - ["Angry"] = [[Interface\AddOns\ElvUI\media\textures\smileys\angry.blp]], - ["Grin"] = [[Interface\AddOns\ElvUI\media\textures\smileys\grin.blp]], - ["Hmm"] = [[Interface\AddOns\ElvUI\media\textures\smileys\hmm.blp]], - ["MiddleFinger"] = [[Interface\AddOns\ElvUI\media\textures\smileys\middle_finger.blp]], - ["Sad"] = [[Interface\AddOns\ElvUI\media\textures\smileys\sad.blp]], - ["Surprise"] = [[Interface\AddOns\ElvUI\media\textures\smileys\surprise.blp]], - ["Tongue"] = [[Interface\AddOns\ElvUI\media\textures\smileys\tongue.blp]], - ["Cry"] = [[Interface\AddOns\ElvUI\media\textures\smileys\weepy.blp]], - ["Wink"] = [[Interface\AddOns\ElvUI\media\textures\smileys\winky.blp]], - ["Happy"] = [[Interface\AddOns\ElvUI\media\textures\smileys\happy.blp]], - ["Heart"] = [[Interface\AddOns\ElvUI\media\textures\smileys\heart.blp]], - ["BrokenHeart"] = [[Interface\AddOns\ElvUI\media\textures\smileys\broken_heart.blp]], -} - -local smileyKeys = { - ["%:%-%@"] = "Angry", - ["%:%@"] = "Angry", - ["%:%-%)"]="Happy", - ["%:%)"]="Happy", - ["%:D"]="Grin", - ["%:%-D"]="Grin", - ["%;%-D"]="Grin", - ["%;D"]="Grin", - ["%=D"]="Grin", - ["xD"]="Grin", - ["XD"]="Grin", - ["%:%-%("]="Sad", - ["%:%("]="Sad", - ["%:o"]="Surprise", - ["%:%-o"]="Surprise", - ["%:%-O"]="Surprise", - ["%:O"]="Surprise", - ["%:%-0"]="Surprise", - ["%:P"]="Tongue", - ["%:%-P"]="Tongue", - ["%:p"]="Tongue", - ["%:%-p"]="Tongue", - ["%=P"]="Tongue", - ["%=p"]="Tongue", - ["%;%-p"]="Tongue", - ["%;p"]="Tongue", - ["%;P"]="Tongue", - ["%;%-P"]="Tongue", - ["%;%-%)"]="Wink", - ["%;%)"]="Wink", - ["%:S"]="Hmm", - ["%:%-S"]="Hmm", - ["%:%,%("]="Cry", - ["%:%,%-%("]="Cry", - ["%:%'%("]="Cry", - ["%:%'%-%("]="Cry", - ["%:%F"]="MiddleFinger", - ["<3"]="Heart", - [" 0 then return false, CH:GetSmileyReplacementText(CH:CheckKeyword(newMsg)), unpack(arg) end + local newMsg, found = gsub(msg, "(%a+)://(%S+)%s?", CH:PrintURL("%1://%2")) + if found > 0 then return false, CH:CheckKeyword(newMsg), unpack(arg) end -- www.example.com - newMsg, found = gsub(text, "www%.([_A-Za-z0-9-]+)%.(%S+)%s?", CH:PrintURL("www.%1.%2")) - if found > 0 then return false, CH:GetSmileyReplacementText(CH:CheckKeyword(newMsg)), unpack(arg) end + newMsg, found = gsub(msg, "www%.([_A-Za-z0-9-]+)%.(%S+)%s?", CH:PrintURL("www.%1.%2")) + if found > 0 then return false, CH:CheckKeyword(newMsg), unpack(arg) end -- example@example.com - newMsg, found = gsub(text, "([_A-Za-z0-9-%.]+)@([_A-Za-z0-9-]+)(%.+)([_A-Za-z0-9-%.]+)%s?", CH:PrintURL("%1@%2%3%4")) - if found > 0 then return false, CH:GetSmileyReplacementText(CH:CheckKeyword(newMsg)), unpack(arg) end + newMsg, found = gsub(msg, "([_A-Za-z0-9-%.]+)@([_A-Za-z0-9-]+)(%.+)([_A-Za-z0-9-%.]+)%s?", CH:PrintURL("%1@%2%3%4")) + if found > 0 then return false, CH:CheckKeyword(newMsg), unpack(arg) end -- IP address with port 1.1.1.1:1 - newMsg, found = gsub(text, "(%d%d?%d?)%.(%d%d?%d?)%.(%d%d?%d?)%.(%d%d?%d?)(:%d+)%s?", CH:PrintURL("%1.%2.%3.%4%5")) - if found > 0 then return false, CH:GetSmileyReplacementText(CH:CheckKeyword(newMsg)), unpack(arg) end + newMsg, found = gsub(msg, "(%d%d?%d?)%.(%d%d?%d?)%.(%d%d?%d?)%.(%d%d?%d?)(:%d+)%s?", CH:PrintURL("%1.%2.%3.%4%5")) + if found > 0 then return false, CH:CheckKeyword(newMsg), unpack(arg) end -- IP address 1.1.1.1 - newMsg, found = gsub(text, "(%d%d?%d?)%.(%d%d?%d?)%.(%d%d?%d?)%.(%d%d?%d?)%s?", CH:PrintURL("%1.%2.%3.%4")) - if found > 0 then return false, CH:GetSmileyReplacementText(CH:CheckKeyword(newMsg)), unpack(arg) end + newMsg, found = gsub(msg, "(%d%d?%d?)%.(%d%d?%d?)%.(%d%d?%d?)%.(%d%d?%d?)%s?", CH:PrintURL("%1.%2.%3.%4")) + if found > 0 then return false, CH:CheckKeyword(newMsg), unpack(arg) end msg = CH:CheckKeyword(msg) - msg = CH:GetSmileyReplacementText(msg) return false, msg, unpack(arg) end diff --git a/2/3/4/5/6/7/ElvUI/Settings/Profile.lua b/2/3/4/5/6/7/ElvUI/Settings/Profile.lua index 7c97da0..591ea5c 100644 --- a/2/3/4/5/6/7/ElvUI/Settings/Profile.lua +++ b/2/3/4/5/6/7/ElvUI/Settings/Profile.lua @@ -400,7 +400,6 @@ P["chat"] = { ["font"] = "PT Sans Narrow", ["fontOutline"] = "NONE", ["sticky"] = true, - ["emotionIcons"] = true, ["keywordSound"] = "None", ["whisperSound"] = "Whisper Alert", ["noAlertInCombat"] = false, diff --git a/2/3/4/5/6/7/ElvUI_Config/Chat.lua b/2/3/4/5/6/7/ElvUI_Config/Chat.lua index 8692095..5527253 100644 --- a/2/3/4/5/6/7/ElvUI_Config/Chat.lua +++ b/2/3/4/5/6/7/ElvUI_Config/Chat.lua @@ -75,17 +75,8 @@ E.Options.args.chat = { CH:UpdateFading(); end }, - emotionIcons = { - order = 6, - type = "toggle", - name = L["Emotion Icons"], - desc = L["Display emotion icons in chat."], - set = function(info, value) - E.db.chat[ info[getn(info)] ] = value; - end - }, fadeUndockedTabs = { - order = 7, + order = 6, type = "toggle", name = L["Fade Undocked Tabs"], desc = L["Fades the text on chat tabs that are not docked at the left or right chat panel."], @@ -95,7 +86,7 @@ E.Options.args.chat = { end }, fadeTabsNoBackdrop = { - order = 8, + order = 7, type = "toggle", name = L["Fade Tabs No Backdrop"], desc = L["Fades the text on chat tabs that are docked in a panel where the backdrop is disabled."], @@ -105,13 +96,13 @@ E.Options.args.chat = { end }, chatHistory = { - order = 9, + order = 8, type = "toggle", name = L["Chat History"], desc = L["Log the main chat frames history. So when you reloadui or log in and out you see the history from your last session."] }, useAltKey = { - order = 10, + order = 9, type = "toggle", name = L["Use Alt Key"], desc = L["Require holding the Alt key down to move cursor or cycle through messages in the editbox."], @@ -121,12 +112,12 @@ E.Options.args.chat = { end }, spacer = { - order = 11, + order = 10, type = "description", name = " ", }, throttleInterval = { - order = 12, + order = 11, type = "range", name = L["Spam Interval"], desc = L["Prevent the same messages from displaying in chat more than once within this set amount of seconds, set to zero to disable."], @@ -139,7 +130,7 @@ E.Options.args.chat = { end }, scrollDownInterval = { - order = 13, + order = 12, type = "range", name = L["Scroll Interval"], desc = L["Number of time in seconds to scroll down to the bottom of the chat window if you are not scrolled down completely."], @@ -149,14 +140,14 @@ E.Options.args.chat = { end }, numAllowedCombatRepeat = { - order = 14, + order = 13, type = "range", name = L["Allowed Combat Repeat"], desc = L["Number of repeat characters while in combat before the chat editbox is automatically closed."], min = 2, max = 10, step = 1 }, numScrollMessages = { - order = 15, + order = 14, type = "range", name = L["Scroll Messages"], desc = L["Number of messages you scroll for each step."], @@ -168,7 +159,7 @@ E.Options.args.chat = { name = " ", }, timeStampFormat = { - order = 17, + order = 15, type = "select", name = L["Chat Timestamps"], desc = "OPTION_TOOLTIP_TIMESTAMPS", @@ -183,13 +174,13 @@ E.Options.args.chat = { } }, useCustomTimeColor = { - order = 18, + order = 16, type = "toggle", name = L["Custom Timestamp Color"], disabled = function() return not E.db.chat.timeStampFormat == "NONE"; end }, customTimeColor = { - order = 19, + order = 17, type = "color", hasAlpha = false, name = L["Timestamp Color"],