From fa315a79af31278fd98dd9fbfb59d4279f108396 Mon Sep 17 00:00:00 2001 From: Sam Mousa Date: Sat, 22 Oct 2022 21:42:03 +0200 Subject: [PATCH] fix: fallback to last chat window if none was given --- .luacheckrc | 3 ++- source/SlashCommands.lua | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.luacheckrc b/.luacheckrc index da84eff..c4e043b 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -27,7 +27,7 @@ globals = { -- Saved Variable "CLM_DB", "CLM_Logs", - -- WoW + -- WoW "_G", -- FrameXML misc @@ -3011,6 +3011,7 @@ globals = { "KBSystem_GetMOTD", "KBSystem_GetServerNotice", "KBSystem_GetServerStatus", + "LAST_ACTIVE_CHAT_EDIT_BOX", "LFGTeleport", "LearnPvpTalent", "LearnPvpTalents", diff --git a/source/SlashCommands.lua b/source/SlashCommands.lua index 7c22bba..876fe21 100644 --- a/source/SlashCommands.lua +++ b/source/SlashCommands.lua @@ -140,7 +140,7 @@ end local function handleTimeTravelCommand(msg, source) - local pprint = printer(source, "ffff0000") + local pprint = printer(source or LAST_ACTIVE_CHAT_EDIT_BOX:GetParent(), "ffff0000") -- parse the message. local buffer = msg