PingByName function

From StealthBot Wiki
Revision as of 09:33, 17 January 2010 by Ribose (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The PingByName Script Support Class function allows you get a user's ping.

This function is provided for backwards compatibility. Use Channel.Users(Index).Ping instead.


This function was added in 2.6 to allow you to get the ping of a user in the channel. It was originally called "Ping".

The function was renamed to "PingByName" for 2.7 due to conflicts with the commonly used parameter name "Ping" in user events.

It may be preferred to use the Channel object to access more detailed information about users in the channel.


'// Returns the cached ping of the specified user.
'// If the user is not present in the channel, it returns -3.
Public Function PingByName(ByVal Username As String) As Long

    PingByName = GetPing(Username)

End Function


This function can be used to get a user's ping, if they are in the channel.

This function's name was changed from Ping() to PingByName() for 2.7.


  • Username is the name of the user who you want the ping of.


This function will return the ping of the specified user in milliseconds. If Username isn't in the channel, it returns -3.


See also