From 8bac341153e6e9916bff8b4dc61ffbcd545b9161 Mon Sep 17 00:00:00 2001 From: atomaka Date: Wed, 25 May 2011 23:18:21 -0400 Subject: [PATCH] Minor cleanup and notifications --- ChatSaver.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ChatSaver.lua b/ChatSaver.lua index ff63605..5e2cb63 100644 --- a/ChatSaver.lua +++ b/ChatSaver.lua @@ -1,8 +1,6 @@ ChatSaver = LibStub('AceAddon-3.0'):NewAddon('ChatSaver','AceConsole-3.0','AceHook-3.0','AceEvent-3.0'); local core = ChatSaver; -local db; - function core:OnInitialize() self:RawHook(SlashCmdList,'JOIN','JoinChannel',true); self:RawHook(SlashCmdList,'LEAVE','LeaveChannel',true); @@ -41,6 +39,7 @@ function core:RejoinChannels(event,message,...) end if(found == false) then + print('Chat Saver: Restoring lost channel, ',channel); JoinPermanentChannel(channel); for index,shown in pairs(ChatSaverDB[channel].frames) do if(shown) then @@ -72,7 +71,10 @@ function core:LeaveChannel(msg) end function core:ToggleChatChannel(checked,channel) - if(ChatSaverDB[channel] == nil) then return end; + if(ChatSaverDB[channel] == nil) then + return; + end + if(checked) then ChatSaverDB[channel]['frames'][FCF_GetCurrentChatFrameID()] = true; else