The functions in this module provide an interface
to the main C++ program.
Synopsis: XM::echoMode( state )
Set the clients echo mode. If echo mode is on,
characters typed on the keyboard are shown in
the input line. If echo mode is off, an "*"
appears for each character typed.
Example:
XM::echoMode(0);
Synopsis: XM::resetStatusMsg( )
Set the status message to a client default value.
Example:
XM::resetStatusMsg();
Synopsis: XM::send( text )
Send a string to the server. Usually there
should be a newline at the end of the string.
Example:
XM::send("slay evil bear\n");
Synopsis: XM::setStatusMsg( message )
Set the text shown in the client's status line.
The C++ part of the client sometimes sets this
message, for example while trying to open
a connection.
Example:
XM::setStatusMsg("Retrieved opponent info");
Synopsis: XM::showError( errorMessage )
Show an error information in the status window.
Example:
# Do something which could cause
# some error
if(@_) { XM::showError(@_); }
Synopsis: XM::telnet( string host, int port )
Open a new connection to a named host on
a specific port. Closes an open connection.
Example:
XM::telnet("my.little.mud.org", 4242);