Modules/bIRC/ircGetBots: Difference between revisions
Jump to navigation
Jump to search
m (→Example) |
mNo edit summary |
||
Line 1: | Line 1: | ||
{{ml_birc}} | {{ml_birc}} | ||
__NOTOC__ | __NOTOC__ | ||
This function | This function can be used to list out all created {{ml_birc|ircbot}}s. | ||
==Syntax== | ==Syntax== |
Revision as of 20:14, 29 July 2009
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 created ircbots.
Syntax
bool ircGetBots ()
Required Arguments
None
Returns
Returns a table over all created ircbots. Returns an empty table if no ircbots exist.
Example
This example adds a command listbots which can be used to print out all currently available ircbots along with their names to console.
function printOutIrcBots ( thePlayer ) local ircBots = ircGetBots () if #ircBots == 0 then outputConsole ( "There are no ircbots!", thePlayer ) else outputConsole ( "There's " .. #ircBots .. " ircbots:", thePlayer ) for key, value in ipairs ( ircBots ) do outputConsole ( "- " .. ircGetName ( value ), thePlayer ) end end end addCommandHandler ( "listbots", printOutIrcBots )
See Also
Bot functions
Creation
Connection
Other
IRC functions
Channel
- ircGetChannelMode
- ircGetChannelTopic
- ircGetChannelUsers
- ircGetConnectedChannels
- ircJoinChannel
- ircPartChannel
- ircSetChannelMode
- ircSetChannelTopic