Rejoin channels only if not currently in them fixed.

This commit is contained in:
Andrew Tomaka 2011-05-27 19:30:56 -04:00
parent 53ca5d2998
commit b9c46370a6

View file

@ -29,7 +29,10 @@ function core:SlashCommand()
end end
function core:RejoinChannels(...) function core:RejoinChannels(...)
local currentChannels = { GetChannelList() }; local currentChannels = {};
for i = 1,select("#",GetChannelList()) do
currentChannels[select(i,GetChannelList())] = true
end
for channel,information in pairs(ChatSaverDB) do for channel,information in pairs(ChatSaverDB) do
if(currentChannels[channel] == nil) then if(currentChannels[channel] == nil) then