Many Jabber/XMPP instant messaging clients provide special processing and presentation of the string "/me " at the beginning of a message body. This specification describes the recommended handling of this "command".
The /me command  is a text string that enables a human user to type an action phrase and have it be presented in a special way within an instant messaging client. The text string is followed by a verb or verb phrase, such as "/me laughs" or "/me is logging off now". This command does not result in the generation of any XMPP protocol. Instead, the command is sent as-is (e.g., <body>/me laughs</body>) and the receiving client performs string-matching on the first four characters of the data included in the <body/> element to determine if the message begins with the string "/me ". If the client finds a match, the receiving client will show the message with a special presentation. It is RECOMMENDED for the client to show the receiving client's understanding of the sender's user name, nickname, or handle  followed by the verb phrase in italicized text, prepended by the "*" character.
For example, imagine that the Greek god Atlas is in a chatroom with the other gods and types the following text in his IM client:
That text will be sent to all the occupants in the chatroom as follows:
Each recipient's client would then show the message with a special presentation, such as:
If the receiving client does not find a match on the string "/me " in the first four characters of the message body, it SHOULD NOT present the text in a special way. For example, the following message bodies do not match:
XHTML-IM (XEP-0071)  describes a method for lightweight formatting of a message body using a subset of XHTML. For example, the stanza shown above might be formatted in the color green, as follows.
The XHTML-formatted version of the message MUST NOT modify the "/me " command string (e.g., in this case to something like "* Atlas shrugs in disgust") because the recipient might have a different user name, nickname, or handle on file for the sender.
This specification describes the /me command in terms of visual presentation. A receiving client that presents messages aurally MAY modify its presentation of /me commands and SHOULD at a minimum transform the string "/me " into the user name, nickname, or handle of the sender.
Multi-User Chat (XEP-0045)  rooms send XMPP presence stanzas when people leave and join the room, and receiving clients typically show these presence changes as the equivalent of in-room messages, such as the following transformation of a presence stanza of type unavailable:
A sender could attempt to spoof such a leave message by sending an XMPP groupchat message stanza whose body text is "/me has left the room". Although the presentation of presence joins and leaves is determined by the receiving client and therefore such a notification cannot be universally spoofed for all receivers, a client SHOULD differentiate between presence notifications and /me commands (e.g., with different colors and different prepended characters, such as several asterisks for presence notifications and one asterisk for /me commands).
This document requires no interaction with the Internet Assigned Numbers Authority (IANA) .
This document requires no interaction with the XMPP Registrar .
Thanks to Dave Cridland, Kevin Smith, and Matthew Wild for their feedback and suggestions.
This document in other formats: XML PDF
This XMPP Extension Protocol is copyright © 1999 – 2018 by the XMPP Standards Foundation (XSF).
Permission is hereby granted, free of charge, to any person obtaining a copy of this specification (the "Specification"), to make use of the Specification without restriction, including without limitation the rights to implement the Specification in a software program, deploy the Specification in a network service, and copy, modify, merge, publish, translate, distribute, sublicense, or sell copies of the Specification, and to permit persons to whom the Specification is furnished to do so, subject to the condition that the foregoing copyright notice and this permission notice shall be included in all copies or substantial portions of the Specification. Unless separate permission is granted, modified works that are redistributed shall not contain misleading information regarding the authors, title, number, or publisher of the Specification, and shall not claim endorsement of the modified works by the authors, any organization or project to which the authors belong, or the XMPP Standards Foundation.
## NOTE WELL: This Specification is provided on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. ##
In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall the XMPP Standards Foundation or any author of this Specification be liable for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising from, out of, or in connection with the Specification or the implementation, deployment, or other use of the Specification (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if the XMPP Standards Foundation or such author has been advised of the possibility of such damages.
This XMPP Extension Protocol has been contributed in full conformance with the XSF's Intellectual Property Rights Policy (a copy of which can be found at <https://xmpp.org/about/xsf/ipr-policy> or obtained by writing to XMPP Standards Foundation, P.O. Box 787, Parker, CO 80134 USA).
The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core (RFC 6120) and XMPP IM (RFC 6121) specifications contributed by the XMPP Standards Foundation to the Internet Standards Process, which is managed by the Internet Engineering Task Force in accordance with RFC 2026. Any protocol defined in this document has been developed outside the Internet Standards Process and is to be understood as an extension to XMPP rather than as an evolution, development, or modification of XMPP itself.
The primary venue for discussion of XMPP Extension Protocols is the <email@example.com> discussion list.
Discussion on other xmpp.org discussion lists might also be appropriate; see <http://xmpp.org/about/discuss.shtml> for a complete list.
Errata can be sent to <firstname.lastname@example.org>.
The following requirements keywords as used in this document are to be interpreted as described in RFC 2119: "MUST", "SHALL", "REQUIRED"; "MUST NOT", "SHALL NOT"; "SHOULD", "RECOMMENDED"; "SHOULD NOT", "NOT RECOMMENDED"; "MAY", "OPTIONAL".
1. The string "/me " is usually pronounced "slash-me".
2. On the difference between user names, nicknames, and handles, see Best Practices to Prevent JID Mimicking (XEP-0165)  and User Nickname (XEP-0172) .
7. The Internet Assigned Numbers Authority (IANA) is the central coordinator for the assignment of unique parameter values for Internet protocols, such as port numbers and URI schemes. For further information, see <http://www.iana.org/>.
8. The XMPP Registrar maintains a list of reserved protocol namespaces as well as registries of parameters used in the context of XMPP extension protocols approved by the XMPP Standards Foundation. For further information, see <https://xmpp.org/registrar/>.
Note: Older versions of this specification might be available at http://xmpp.org/extensions/attic/
Per a vote of the XMPP Council, advanced specification to Active and changed type from Historical to Informational.
Clarified handling of XHTML-IM formatting; added security consideration for multi-user chat rooms.
Initial published version.