From ee032e1909172af756c286d8bdf5fb1785c12bd6 Mon Sep 17 00:00:00 2001 From: PhatPhuckDave Date: Sun, 8 Dec 2024 01:30:17 +0100 Subject: [PATCH] Fix bug with tab creation --- Channeler.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Channeler.lua b/Channeler.lua index f06829d..9ef1b02 100644 --- a/Channeler.lua +++ b/Channeler.lua @@ -1,6 +1,7 @@ ---@class Channel ---@field name string ---@field password string|nil + local debug = false ---@type Channel[] @@ -73,7 +74,7 @@ local function FindOrCreateChatFrame(chatFrameName, groups, channels) local frame = _G["ChatFrame" .. i] if FCF_IsValidChatFrame(frame) then if debug then print(string.format("Frame %s is valid", chatFrameName)) end - return frame + chatFrame = frame else if debug then print(string.format("Frame %s is invalid", chatFrameName)) end end @@ -109,7 +110,7 @@ local frame = CreateFrame("Frame") frame:RegisterEvent("PLAYER_ENTERING_WORLD") frame:SetScript("OnEvent", function(self, event, ...) JoinChannels() - --FindOrCreateChatFrame("Auto", subscribedMessageGroups, subscribedChannels) - FindOrCreateChatFrame("Agent", {}, { "Agent" }) - FindOrCreateChatFrame("Horde", {}, { "Horde" }) + FindOrCreateChatFrame("Auto", subscribedMessageGroups, subscribedChannels) + -- FindOrCreateChatFrame("Agent", {}, { "Agent" }) + -- FindOrCreateChatFrame("Horde", {}, { "Horde" }) end)