From 71036313e99cfa16e7c367328a04e7d88cbdba2f Mon Sep 17 00:00:00 2001 From: atomaka Date: Fri, 3 Jun 2011 04:56:12 -0400 Subject: [PATCH] GetChannelTable fucntion to return a list of channels: NOT FUNCTIONAL --- ChatSaver.lua | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/ChatSaver.lua b/ChatSaver.lua index efadadd..b88989c 100644 --- a/ChatSaver.lua +++ b/ChatSaver.lua @@ -73,6 +73,27 @@ function core:SetupChatSaver(...) self:UnregisterEvent('CHAT_MSG_CHANNEL_NOTICE'); 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) self.hooks[SlashCmdList].JOIN(msg);