sylvanaar / wow-instant-messenger

WIM (WoW Instant Messenger) is a World of Warcraft addon which brings an instant messenger feel to communication in game.
https://www.curseforge.com/wow/addons/wim-3
MIT License
12 stars 14 forks source link

Guids split by "-" not ":" #2

Closed TimoshN closed 4 years ago

TimoshN commented 4 years ago

https://github.com/sylvanaar/wow-instant-messenger/blob/a94ea84d4f78ec5236e59843a96dd266460cba25/Sources/Constants.lua#L141

TimoshN commented 4 years ago

https://github.com/sylvanaar/wow-instant-messenger/blob/a94ea84d4f78ec5236e59843a96dd266460cba25/Sources/Constants.lua#L142 And type is "Player"

TimoshN commented 4 years ago

And add pls url decoder

local decodeURI
do
   local char, gsub, tonumber = string.char, string.gsub, _G.tonumber
   local function decode(hex) return char(tonumber(hex, 16)) end

   function decodeURI(s)
      s = gsub(s, '%%(%x%x)', decode)
      return s
   end
end

Adding theMsg = decodeURI(theMsg) before theMsg = encodeColors(theMsg); https://github.com/sylvanaar/wow-instant-messenger/blob/a94ea84d4f78ec5236e59843a96dd266460cba25/Modules/URLHandler.lua#L119-L147