Modules/bIRC/ircGetBots: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
Line 5: | Line 5: | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
table ircGetBots () | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Latest revision as of 10:50, 30 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
table 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