world.ChatDisconnect

MUSHclient script function (Method) — introduced in version 3.37

Disconnects a current chat call

Prototype

long ChatDisconnect(long ID);

Data type meanings

Description

Disconnects an existing chat call.

The call is identified by its "chat ID" - each chat session has a unique ID, which starts at one, and is incremented by one, per world.

You can use GetChatList to find a list of chat IDs that is current.

You can use ChatGetID to find the chat ID corresponding to a particular chat name.

If a file transfer is in progress it is aborted.

The plugin callback routine "OnPluginChatUserDisconnect" will be called for this user.

VBscript example

ChatDisconnect 5  ' disconnect chat user 5
ChatDisconnect ChatGetID ("nick")  ' disconnect nick

Jscript example

ChatDisconnect (5);  // disconnect chat user 5
ChatDisconnect (ChatGetID ("nick"));  // disconnect nick

PerlScript example

ChatDisconnect (5);  #/ disconnect chat user 5
ChatDisconnect (ChatGetID ("nick"));  # disconnect nick

Python example

world.ChatDisconnect (5)  # disconnect chat user 5
world.ChatDisconnect (world.ChatGetID ("nick"))  # disconnect nick

Lua example

ChatDisconnect (5)  -- disconnect chat user 5
ChatDisconnect (ChatGetID ("nick"))  -- disconnect nick

Return value

eChatIDNotFound: That chat ID was not found
eOK: Disconnected OK

Return code meanings

Related topic

Chat system

See also

FunctionDescription
ChatAcceptCallsAccepts incoming chat calls
ChatCallCalls a chat server (makes an outgoing call) using the MudMaster chat protocol
ChatDisconnectAllDisconnects all current chat calls
ChatGetIDLooks up what chat ID (identifier) corresponds to a particular chat name
ChatStopAcceptingCallsStops this world from accepting chat calls
GetChatListGets the list of chat sessions