|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 current state of specified ircbot.
string ircGetBotState ( ircbot theBot )
- theBot: The ircbot which current state you want to get
Returns a string of the ircbot's current state. Possible values are:
If invalid arguments were passed, it returns false.
This example creates an ircbot called DummyBot and makes it connect to a server. During the connection progress bot's current states are printed out to the server log.
function resourceStart () dummyBot = ircCreateBot ( "DummyBot" ) outputServerLog ( "DummyBot is now " .. ircGetBotState ( dummyBot ) ) -- "disconnected" ircConnect ( dummyBot, "irc.gtanet.com", 6667 ) outputServerLog ( "DummyBot is now " .. ircGetBotState ( dummyBot ) ) -- "connecting" end addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource() ), resourceStart ) function event_ircOnConnect ( theBot ) outputServerLog ( ircGetName ( theBot ) .. " is now " .. ircGetBotState ( theBot ) ) -- "connected" end