|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 check whether the specified ircbot is connected to a server.
bool ircIsConnected ( ircbot theBot )
- theBot: The ircbot which connection state you want to check.
Returns true if the ircbot is connected, false otherwise.
This example adds a command isbotconnected which can be used to determine if a certain bot is connected or not.
function checkIsBotConnected ( thePlayer, commandName, botName ) local theBot = ircGetBotByName ( botName ) if theBot then if ircIsConnected ( theBot ) outputChatBox ( "Yes, " .. botName .. " is connected!", thePlayer ) else outputChatBox ( "Nope, " .. botName .. " isn't connected!", thePlayer ) end else outputChatBox ( "There is no bot called " .. botName .. "!", thePlayer ) end end addCommandHandler ( "isbotconnected", checkIsBotConnected )