Do not save chat frame information for zone channels

This commit is contained in:
Andrew Tomaka 2011-05-25 23:04:12 -04:00
parent 74958b0366
commit 521cd01d7c

View file

@ -43,7 +43,9 @@ function core:RejoinChannels(event,message,...)
if(found == false) then if(found == false) then
JoinPermanentChannel(channel); JoinPermanentChannel(channel);
for index,shown in pairs(ChatSaverDB[channel].frames) do for index,shown in pairs(ChatSaverDB[channel].frames) do
_G['ChatFrame'..index].channelList[table.getn(_G['ChatFrame'..index].channelList) + 1] = channel; if(shown) then
_G['ChatFrame'..index].channelList[table.getn(_G['ChatFrame'..index].channelList) + 1] = channel;
end
end end
end end
end end
@ -66,10 +68,11 @@ function core:LeaveChannel(msg)
local number = gsub(msg, "%s*([^%s]+).*", "%1"); local number = gsub(msg, "%s*([^%s]+).*", "%1");
local _,name = GetChannelName(number); local _,name = GetChannelName(number);
--ChatSaverDB[name] = nil; ChatSaverDB[name] = nil;
end end
function core:ToggleChatChannel(checked,channel) function core:ToggleChatChannel(checked,channel)
if(ChatSaverDB[channel] == nil) then return end;
if(checked) then if(checked) then
ChatSaverDB[channel]['frames'][FCF_GetCurrentChatFrameID()] = true; ChatSaverDB[channel]['frames'][FCF_GetCurrentChatFrameID()] = true;
else else