|This function is provided by the external module Basic IRC Module. You must install this module to use this function.|
This function can be used to list out all the channels a specified ircbot has connected to.
table ircGetConnectedChannels ( ircbot theBot )
- theBot: The ircbot which connected channels you want to get
Returns a table over all connected channels. Returns an empty table if the ircbot isn't connected to any channel.
This example adds a command listchannels which can be used to print out all channels where the specified ircbot is connected to the console.
function printOutChannels ( thePlayer, commandName, name ) local theBot = ircGetBotByName ( name ) if not theBot then outputConsole ( "There's no ircbot called " .. name .. "!", thePlayer ) else local channels = ircGetConnectedChannels ( theBot ) outputConsole ( name .. " is on " .. #channels .. " channels:", thePlayer ) for key, value in ipairs ( channels ) do outputConsole ( "- " .. value, thePlayer ) end end end addCommandHandler ( "listchannels", printOutChannels )