From 2eff237c820a9554420af1688fee526ac2aa26ca Mon Sep 17 00:00:00 2001 From: Ironi Date: Tue, 14 Mar 2017 02:51:31 +0200 Subject: [PATCH] fixed bnet whispers --- iKeystones.lua | 7 +++++++ iKeystones.toc | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/iKeystones.lua b/iKeystones.lua index 9feea5e..fc04360 100644 --- a/iKeystones.lua +++ b/iKeystones.lua @@ -212,6 +212,13 @@ end local function chatFiltering(self, event, msg, ...) local linkStart = msg:find('Hitem:138019') if linkStart then + if event == 'CHAT_MSG_BN_WHISPER_INFORM' or event == "CHAT_MSG_BN_WHISPER" then + linkStart = linkStart + 10 + msg = msg:gsub('|Hitem:138019', '|cffa335ee|Hitem:138019') + local m = msg:sub(math.max(linkStart-1, 0)) + local keystoneName = m:match('%[(.-)%]') + msg = msg:gsub(keystoneName..'%]|h', keystoneName..']|h|r', 1) + end local preLink = msg:sub(1, linkStart-12) local linkStuff = msg:sub(math.max(linkStart-11, 0)) local tempTable = {strsplit(':', linkStuff)} diff --git a/iKeystones.toc b/iKeystones.toc index 0edc1d7..cfdac51 100644 --- a/iKeystones.toc +++ b/iKeystones.toc @@ -2,7 +2,7 @@ ## Title: iKeystones ## Notes: Tracks your keystones ## Author: Ironi -## Version: 1.32 +## Version: 1.33 ## DefaultState: enabled ## SavedVariables: iKeystonesDB -- 1.7.9.5