IsOnline function

From StealthBot Wiki
Revision as of 21:06, 25 August 2009 by Ribose (talk | contribs) (moved IsOnline to IsOnline function)
Jump to: navigation, search

The IsOnline() function is available to StealthBot through the Script Support Class. It allows users to determine whether the bot is connected to through scripting.


The IsOnline function was added in StealthBot version 2.6 by the request of Xellos.


'// Returns a boolean denoting teh bot's status ONLINE=TRUE, OFFLINE=FALSE.
Public Function IsOnline() As Boolean

    IsOnline = g_Online

End Function


This function returns true if the bot is online, and false if not.


Store the value:

BooleanValue = IsOnline()

Do something if the bot is online:

If IsOnline() Then
    ' code here
End If


True if the bot is online, false otherwise.

Example usage

  • Connect if offline:
  • If Not IsOnline() Then Connect

See also