PingByName function

From StealthBot Wiki Backup
(Redirected from Ping function)
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.

Development

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.

Documentation

'// 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

Summary

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.

Arguments

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

Returns

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

Examples

See also