Modules/bIRC/ircDestroyBot
Jump to navigation
Jump to search
This function is provided by the external module Basic IRC Module. You must install this module to use this function. | |
This function is used to destroy a created ircbot. After deletion, the ircbot pointer will nolonger be valid. If ircbot is connected, it will be disconnected from the server.
Syntax
bool ircDestroyBot ( ircbot theBot )
Required Arguments
- theBot: The ircbot which will be destroyed.
Returns
Returns true if ircbot was successfully destroyed, false otherwise.
Example
This example creates an ircbot called DummyBot on resource start and destroys the bot once the resource has stopped.
function resourceStart() theBot = ircCreateBot ( "DummyBot" ) end addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource() ), resourceStart ) function resourceStop() if theBot then ircDestroyBot ( theBot ) end end addEventHandler ( "onResourceStop", getResourceRootElement ( getThisResource() ), resourceStop )
See Also
Bot functions
Creation
Connection
Other
IRC functions
Channel
- ircGetChannelMode
- ircGetChannelTopic
- ircGetChannelUsers
- ircGetConnectedChannels
- ircJoinChannel
- ircPartChannel
- ircSetChannelMode
- ircSetChannelTopic