Modules/bIRC/ircDestroyBot

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Package-x-generic.png 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 (), resourceStart )

function resourceStop()
    if theBot then
        ircDestroyBot ( theBot )
    end
end
addEventHandler ( "onResourceStop", getResourceRootElement (), resourceStop )

See Also

Bot functions

Creation

Connection

Other

IRC functions

Channel

User

Communication

Other