Forced channel list for testing.
This commit is contained in:
parent
c30b3ba86c
commit
f353227f68
1 changed files with 23 additions and 7 deletions
|
@ -1,17 +1,33 @@
|
||||||
ChatSaver = LibStub('AceAddon-3.0'):NewAddon('ChatSaver','AceHook-3.0','AceEvent-3.0');
|
ChatSaver = LibStub('AceAddon-3.0'):NewAddon('ChatSaver','AceHook-3.0','AceEvent-3.0');
|
||||||
local core = ChatSaver;
|
local core = ChatSaver;
|
||||||
|
|
||||||
function core:OnEnable()
|
function core:OnInitialize()
|
||||||
self:RegisterEvent('PLAYER_LOGIN','ReloadUI');
|
self:RegisterEvent('PLAYER_LOGIN','ReloadUI');
|
||||||
end
|
end
|
||||||
|
|
||||||
function core:ReloadUI()
|
function core:ReloadUI()
|
||||||
channels = ListChannels();
|
channelList = {};
|
||||||
print('Channels' .. channels);
|
|
||||||
|
for i = 1, select("#",GetChannelList()), 2 do
|
||||||
|
local index,channel = select(i,GetChannelList());
|
||||||
|
channelList[index] = channel;
|
||||||
end
|
end
|
||||||
|
|
||||||
function core:JoinChannelByName(chatFrameIndex,channel)
|
myChannels = {};
|
||||||
|
|
||||||
|
myChannels[1] = 'General';
|
||||||
|
myChannels[2] = 'Trade';
|
||||||
|
myChannels[3] = 'LocalDefense';
|
||||||
|
myChannels[4] = 'ncaheal';
|
||||||
|
myChannels[5] = 'ncabads';
|
||||||
|
myChannels[6] = 'ncafail';
|
||||||
|
|
||||||
|
for index,channel in pairs(myChannels) do
|
||||||
|
if(channel ~= channelList[index]) then
|
||||||
|
print('Channel ',channel,' not joined. Rejoining now!');
|
||||||
|
JoinPermanentChannel(channel);
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--AddChatWindowChannel(chatFrameIndex, "channel") - Make a chat channel visible in a specific ChatFrame.
|
--AddChatWindowChannel(chatFrameIndex, "channel") - Make a chat channel visible in a specific ChatFrame.
|
||||||
|
|
Loading…
Reference in a new issue