ChatCallzChat
Script function

world.ChatCallzChat

DOC_scripting Read about scripting

Type

Method

Summary

Calls a zChat chat server (makes an outgoing call)

Prototype

long ChatCallzChat(BSTR Server, long Port);

DOC_data_types View list of data type meanings


Description

Attempts to establish a chat call to another client using the zChat protocol.

Use ChatCall to call using the MudMaster chat protocol.

You specify the TCP/IP address and the port number. If the port number is zero the default chat port of 4050 is used.

Because of the asynchronous nature of TCP/IP a "good" status from this call does not necessarily mean you will establish a chat session, it just means it has succeeded in starting the process.

In order to establish a chat session, MUSHclient must:

1. Look up the name using the Domain Name Server (DNS) unless a dotted-decimal name was given - this may take a few seconds.
2. Connect to the chat server - this may take a few more seconds
3. Attempt to negotiate a chat session by sending "ZCHAT:" to the chat server
4. Await a response - this may take a while if the player at the other end is deciding whether to accept the connection or not.
5. Finally, if all goes well, the chat session is established.

To know if the session was really established you need to use the plugin callback routine "OnPluginChatNewUser" - this notifies you when a new user is established.



VBscript example

ChatCallzChat "123.45.67.89", 0     ' call on default port
ChatCallzChat "123.45.67.89", 4060  ' call on port 4060
ChatCallzChat "myfriend.hisdomain.com", 0    ' call on default port using name



Jscript example

ChatCallzChat ("123.45.67.89", 0);     // call on default port
ChatCallzChat ("123.45.67.89", 4060);  // call on port 4060
ChatCallzChat ("myfriend.hisdomain.com", 0);    // call on default port using name



PerlScript example

ChatCallzChat ("123.45.67.89", 0);     # call on default port
ChatCallzChat ("123.45.67.89", 4060);  # call on port 4060
ChatCallzChat ("myfriend.hisdomain.com", 0);    # call on default port using name



Python example

world.ChatCallzChat ("123.45.67.89", 0)     # call on default port
world.ChatCallzChat ("123.45.67.89", 4060)  # call on port 4060
world.ChatCallzChat ("myfriend.hisdomain.com", 0)    # call on default port using name



Lua example

ChatCallzChat ("123.45.67.89")     -- call on default port
ChatCallzChat ("123.45.67.89", 4060)  -- call on port 4060
ChatCallzChat ("myfriend.hisdomain.com")    -- call on default port using name



Lua notes

The Port argument is optional. If omitted it defaults to 4050.



Return value

eCannotCreateChatSocket: Cannot start call - perhaps all sockets are in use?
eCannotLookupDomainName: Cannot start looking up domain name
eOK: Call process started OK


DOC_errors View list of return code meanings


See Also ...

Topics

DOC_chat Chat system
DOC_starting Getting started

Functions

FNC_ChatAcceptCalls ChatAcceptCalls (Accepts incoming chat calls)
FNC_ChatCall ChatCall (Calls a chat server (makes an outgoing call) using the MudMaster chat protocol)
FNC_ChatDisconnect ChatDisconnect (Disconnects a current chat call)
FNC_ChatDisconnectAll ChatDisconnectAll (Disconnects all current chat calls)
FNC_ChatEverybody ChatEverybody (Sends a chat message to every connected chat user)
FNC_ChatGetID ChatGetID (Looks up what chat ID (identifier) corresponds to a particular chat name)
FNC_ChatGroup ChatGroup (Sends a chat message to every connected chat user in the specified group)
FNC_ChatID ChatID (Sends a chat message to a particular chat session)
FNC_ChatMessage ChatMessage (Sends a message to a chat user (raw format))
FNC_ChatNameChange ChatNameChange (Changes your chat name)
FNC_ChatNote ChatNote (Does a note using ANSI codes for the chat system)
FNC_ChatPasteEverybody ChatPasteEverybody (Pastes the clipboard contents to every connected person)
FNC_ChatPasteText ChatPasteText (Pastes the clipboard contents to that person)
FNC_ChatPeekConnections ChatPeekConnections (Sends a "peek connections" message to the specified chat user)
FNC_ChatPersonal ChatPersonal (Sends a chat message to a particular person)
FNC_ChatPing ChatPing (Sends a ping message to the specified chat user)
FNC_ChatRequestConnections ChatRequestConnections (Sends a "request connections" message to the specified chat user)
FNC_ChatSendFile ChatSendFile (Starts sending a file to the specified chat user)
FNC_ChatStopAcceptingCalls ChatStopAcceptingCalls (Stops this world from accepting chat calls)
FNC_ChatStopFileTransfer ChatStopFileTransfer (Stops a file transfer in progress to that chat user)
FNC_GetChatInfo GetChatInfo (Get information about a chat connection)
FNC_GetChatList GetChatList (Gets the list of chat sessions)
FNC_GetChatOption GetChatOption (Gets the value of a chat session option)
FNC_SetChatOption SetChatOption (Sets the value of a chat session option)

(Help topic: function=ChatCallzChat)

DOC_contents Documentation contents page