From a005f121948a19d449366251b01dfa0c3d217112 Mon Sep 17 00:00:00 2001 From: atomaka Date: Tue, 9 Aug 2011 06:10:10 -0400 Subject: [PATCH] Use CHANNEL_UI_UPDATE for rejoining channels as well as initial setup. --- ChatSaver.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ChatSaver.lua b/ChatSaver.lua index 0944525..a76cf13 100644 --- a/ChatSaver.lua +++ b/ChatSaver.lua @@ -14,9 +14,10 @@ function core:OnEnable() self:Hook('ToggleChatChannel','ToggleChatChannel',true) self:RegisterEvent('CHAT_MSG_CHANNEL_NOTICE','ProcessChannelChange') - self:RegisterEvent('PLAYER_ALIVE','RejoinChannels') if core.firstrun then self:RegisterEvent('CHANNEL_UI_UPDATE','SetupChatSaver') + else + self:RegisterEvent('CHANNEL_UI_UPDATE','RejoinChannels') end end @@ -78,7 +79,7 @@ function core:ProcessChannelChange(_,message,_,_,_,_,_,_,index,name) ChatSaverDB[name]['frames'][DEFAULT_CHAT_FRAME:GetID()] = true end elseif message == 'YOU_LEFT' then - ChatSaverDB[name] = nil + --ChatSaverDB[name] = nil end end