Jump to content

Client-to-client protocol

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Franciscouzo (talk | contribs) at 01:34, 20 July 2011 (changed some erroneous content). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Client-To-Client Protocol (CTCP) is a special type of communication between Internet Relay Chat (IRC) clients.

CTCP is a common protocol implemented by most major IRC clients in use today. CTCP extends the original IRC protocol by allowing users to query other clients or channels, this causes all the clients in the channel to reply the CTCP, for specific information. Additionally, CTCP can be used to encode messages that the raw IRC protocol would not allow to be sent over the link, such as messages containing newlines or the byte value 0 (NUL). CTCP does not establish a direct connection between clients; however, it is commonly used to negotiate DCC connections.

CTCP allows users to query a remote client about the version of the client they are using (via CTCP VERSION), the time (via CTCP TIME), or get remote user info (via CTCP USERINFO), among other things. It is also used to implement the /me command (via CTCP ACTION).

A CTCP message is implemented as a PRIVMSG or NOTICE where the first and last characters of the message are ASCII value 0x01. Additionally, characters which would not be allowed in the IRC protocol are escaped. Since a NOTICE as the standard should not generate another NOTICE as a reply, CTCP messages are sent as PRIVMSG and the reply is implemented with a NOTICE instead of a PRIVMSG.

See also

  • DCC (Direct Client-to-Client)