world.ChatPing

MUSHclient script function (Method) — introduced in version 3.37

Sends a ping message to the specified chat user

Prototype

long ChatPing(long ID);

Data type meanings

Description

This sends a "ping request" chat message (26) (not an ICMP message) to the specified chat user. They should response by echoing the message back with a "ping response" message type (27).

MUSHclient makes a note of the time the ping message was sent, so that when the ping response arrives, it can work out how long the ping took for the round trip.

VBscript example

ChatPing ChatGetID ("john")

Jscript example

ChatPing (ChatGetID ("john"));

PerlScript example

ChatPing (ChatGetID ("john"));

Python example

world.ChatPing (world.ChatGetID ("john"))

Lua example

ChatPing (ChatGetID ("john"))

Return value

eChatIDNotFound: The chat ID was not connected.
eOK: Ping message sent.

Return code meanings

Related topic

Chat system

See also

FunctionDescription
ChatGetIDLooks up what chat ID (identifier) corresponds to a particular chat name
ChatMessageSends a message to a chat user (raw format)