Modules/bIRC/ircCreateBot

From Multi Theft Auto: Wiki
Revision as of 16:46, 11 February 2015 by Ccw (talk | contribs) (→‎Example)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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 create an ircbot which are the basis of the module. ircRegister is automatically executed for created bot for the current resource after bot creation.

Syntax

ircbot ircCreateBot ( string botName )

Required Arguments

  • botName: The name that ircbot will receive.
Note: Validity of the bot names are not checked. Make sure you enter a name the server you are connecting to accepts.

Returns

Returns the ircbot pointer if passed arguments were valid, false otherwise.

Example

This example creates an ircbot called DummyBot and stores it to variable theBot on resource start.

function resourceStart()
    theBot = ircCreateBot ( "DummyBot" )
end
addEventHandler ( "onResourceStart", getResourceRootElement (), resourceStart )

See Also

Bot functions

Creation

Connection

Other

IRC functions

Channel

User

Communication

Other