MUME Help
MPI PROTOCOL
The MUME MPI (an acronym whose meaning has been lost in time
like tears in rain) is an older MUME-specific client
protocol. Its functionality has been superseded by
GMCP.
Command Format
The MPI commands, which can be sent either from or to the client, are all of the format<start> <command> [<length>]
<newline> <data>
.
<start> is the MPI start sequence ~$#E
. The MPI
must follow a newline (a telnet
CR LF
sequence).
<command>
is one of the following letters:
I
|
identify for remote editing and viewing (from client) |
E
|
edit (to/from client) |
V
|
view (to client) |
P
|
prompt settings (from client; deprecated) |
X
|
XML settings (from client) |
<length> is the length in bytes of <data> as a string of ASCII digits. If absent, taken to be zero.
<newline> is a single newline, ASCII 10.
The reference client implementation can be found in powwow.
The I command
The I command takes no arguments:
~$#EI
The E command
The E command involves several different messages. One of these is sent by the server, and the other two are sent by the client.
The E command sent by the server
When requesting that the client begin a new editing session, the server sends the following:
- MPI init string.
-
The character
E
. - The length of the remainder of the message in bytes.
- A newline character.
-
The character
M
. - A session identifier, consisting of a string of digits.
- A newline character.
- The description of the session. (This is free-form text, terminated by exactly one newline).
- The initial contents of the editing session (which may or may not end with a newline).
<data> is raw binary data, duplicating any IACs (as per the Telnet protocol), but any CR or LF are sent unmodified (as opposed to how Telnet does it).
The E command sent by the client
The client may end an active editing session in one of two ways: by uploading the text generated by the editor, or by canceling the message.Here's what the "cancel" message looks like:
- MPI init string.
-
The character
E
. - The length of the message.
- A newline character.
-
The character
C
- The session identifier, represented by a string of digits.
- A newline character.
- MPI init string.
-
The character
E
. - The length of the message.
- A newline character.
-
The character
E
. - The session identifier.
- A newline character.
- The edited text.
The V command
TheV
(or view) command is even simpler. It
consists of one message, from server to client:
- MPI init string.
-
The character
V
. - Length in bytes.
- A newline character.
- Text to be displayed with the pager.
Remote editing (E & V commands) in the protocol stack
MUME processes Telnet IAC sequences before the received MUME Protocol data and escapes them (as IAC IAC) in the sent data. No other transformation is applied to the binary data transmitted. The data is expected to be encoded as ISO 8859-1 with Unix line endings (LF only) and not contain any NUL characters.
The P command (deprecated)
The deprecatedP
command was used to set
prompt display settings.
The X command
TheX
command enables or disables XML mode. It
is a variable-length command, with a mode for the first
character and options as following
characters.
Modes:
0
|
disables XML mode |
1
|
enables XML mode |
2
|
disables XML mode without sending
</xml>
|
3
|
enables XML mode without sending
<xml>
|
Options:
G
|
Enable gratuitous output until disconnected. In this mode, descriptions
are sent without regard for
brief/spam mode, but those that
would have been hidden by
brief/spam are wrapped in an extra
<gratuitous> tag.
|
Example 1:
~$#EX2 1GExample 2:
~$#EX1 3Credits: The documentation of the
E
and
V
commands was contributed by Kron.
See also: | CLIENT PROTOCOL, XML, LOCAL EDITOR, TLS, GMCP |
Generated on Fri Apr 25 07:40:47 2025