GetChannelTable fucntion to return a list of channels: NOT FUNCTIONAL

This commit is contained in:
Andrew Tomaka 2011-06-03 04:56:12 -04:00
parent dcde240f24
commit 71036313e9

View file

@ -73,6 +73,27 @@ function core:SetupChatSaver(...)
self:UnregisterEvent('CHAT_MSG_CHANNEL_NOTICE'); self:UnregisterEvent('CHAT_MSG_CHANNEL_NOTICE');
end end
function core:GetChannelInfo(id)
--addon.lua:373
--channelapi.lua:65
--channelapi.lua:55
local channelTable = core:GetChanneltable();
end
function core:GetChannelTable()
local channelList = { GetChannelList() };
local channelTable = {};
for i = 1,#channelList,2 do
channelTable[channelList[i]] = channelList[i + 1];
channelTable[channelList[i + 1]] = channelList[i];
if(type(channelList[i + 1]) == 'string') then
channelTable[channelList[i + 1]:lower()] = channelList[i];
end
end
return channelTable;
end
function core:JoinChannel(msg) function core:JoinChannel(msg)
self.hooks[SlashCmdList].JOIN(msg); self.hooks[SlashCmdList].JOIN(msg);