Modules/bIRC/ircGetName
From Multi Theft Auto: Wiki
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 retrieve the name of the specified ircbot.
Syntax
string ircGetName ( ircbot theBot )
Required Arguments
- theBot: The ircbot which name you want to get
Returns
Returns a string of the ircbot's name if passed arguments were valid, false otherwise.
Example
This example creates an ircbot called DummyBot and makes it connect to a server. Once it has connected, it prints out a message with the bot's name to server log.
function resourceStart () dummyBot = ircCreateBot ( "DummyBot" ) ircConnect ( dummyBot, "irc.gtanet.com", 6667 ) end addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource() ), resourceStart ) function event_ircOnConnect ( theBot ) outputServerLog ( ircGetName ( theBot ) .. " is now connected!" ) end
See Also
Bot functions
Creation
Connection
Other
IRC functions
Channel
- ircGetChannelMode
- ircGetChannelTopic
- ircGetChannelUsers
- ircGetConnectedChannels
- ircJoinChannel
- ircPartChannel
- ircSetChannelMode
- ircSetChannelTopic