1
0
Fork 0

Cleaner verifying joined channels code

This commit is contained in:
Andrew Tomaka 2011-05-27 15:08:27 -04:00
parent 2f596575d8
commit 5331debea4
1 changed files with 4 additions and 11 deletions

View File

@ -27,21 +27,14 @@ function core:RejoinChannels(event,message,...)
return;
end
local channelList = {};
for i = 1, select("#",GetChannelList()), 2 do
local currentChannels = {};
for i = 1,select("#",GetChannelList()),2 do
local index,channel = select(i,GetChannelList());
channelList[index] = channel;
currentChannels[channel] = true;
end
for channel,information in pairs(ChatSaverDB) do
local found = false;
for jIndex,jChannel in pairs(channelList) do
if(jChannel == channel) then
found = true;
end
end
if(found == false) then
if(currentChannels[channel] == nil) then
JoinPermanentChannel(channel);
for index,shown in pairs(ChatSaverDB[channel].frames) do
if(shown) then