WoW API: GetChannelList

From AddOn Studio
Jump to navigation Jump to search

WoW API < GetChannelList

GetChannelList

Retrieves joined channels.

id1, name1, isOwner1, id2, name2, isOwner2 ... = GetChannelList();

Parameters

Arguments

() - none

Returns

id1, name1, isOwner1...
triplets of channel number, channel name, and channel ownership (?).

    GetJoinedChannels = function ()
        local channels = { }
        local chanList = { GetChannelList() }
        for i=1, #chanList, 3 do
            table.insert(channels, {
                id = chanList[i],
                name = chanList[i+1],
                owned = chanList[i+2], -- Is owned the 3rd parameter?
            })
        end
        return channels;
    end,