Module: XM

Module: XM

The functions in this module provide an interface
to the main C++ program. 

Table 3.6. Functions

echoMode resetStatusMsg send
setStatusMsg showError telnet

echoMode

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);


resetStatusMsg

Synopsis: XM::resetStatusMsg(  )

Set the status message to a client default value.

Example:
	XM::resetStatusMsg();


send

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");


setStatusMsg

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");


showError

Synopsis: XM::showError( errorMessage )

Show an error information in the status window.

Example:
	# Do something which could cause
  	# some error
	if(@_) { XM::showError(@_); }


telnet

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);


KDE Logo