world.ChatDisconnect
Disconnects a current chat call
Prototype
long ChatDisconnect(long ID);
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
Related topic
See also
| Function | Description |
|---|---|
| ChatAcceptCalls | Accepts incoming chat calls |
| ChatCall | Calls a chat server (makes an outgoing call) using the MudMaster chat protocol |
| ChatDisconnectAll | Disconnects all current chat calls |
| ChatGetID | Looks up what chat ID (identifier) corresponds to a particular chat name |
| ChatStopAcceptingCalls | Stops this world from accepting chat calls |
| GetChatList | Gets the list of chat sessions |