Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Client-to-client protocol
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{short description|Type of communication between Internet Relay Chat (IRC) clients}} {{Multiple issues| {{More citations needed |date=June 2024}} {{how-to |date=June 2024}} }} '''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.{{citation needed|date=January 2017}} 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 [[newline]]s or the [[byte]] value 0 (NULL). CTCP does not establish a direct connection between clients; however, it is commonly used to negotiate [[Direct Client-to-Client|DCC]] connections. CTCP allows users to query a remote client about the version of the client they are using (via <code>CTCP VERSION</code>), or the time (via <code>CTCP TIME</code>), among other things. It is also used to implement the /me command (via <code>CTCP ACTION</code>). ==History== [[ircII]] was the first IRC client to implement the CTCP and DCC protocols.<ref>{{cite book | last = Piccard | first = Paul |author2=Brian Baskin |author3=George Spillman |author4=Marcus Sachs | title = Securing IM and P2P Applications for the Enterprise | edition = 1st | date = May 1, 2005 | publisher = Syngress | isbn = 1-59749-017-2 | page = 386 | chapter = IRC Networks and Security | quote = The authors of the ircII software package originally pioneered file transfers over IRC. }}</ref> The CTCP protocol was implemented by Michael Sandrof in 1990 for ircII version 2.1,<ref>See the 'NOTES' and 'source/ctcp.c' files included with [http://download.ircii.org/historical/unsorted/clients/unix/ircii/ircii-2.1.4e.tar.gz ircii-2.1.4e.tar.gz]{{dead link|date=August 2017 |bot=InternetArchiveBot |fix-attempted=yes }}</ref> while the DCC protocol was implemented by Troy Rollo in 1991 for version 2.1.2.<ref>See the 'UPDATES' and 'source/dcc.c' files included with [http://download.ircii.org/historical/unsorted/clients/unix/ircii/ircii-2.1.4e.tar.gz ircii-2.1.4e.tar.gz]{{dead link|date=August 2017 |bot=InternetArchiveBot |fix-attempted=yes }}</ref> ==Structure== A CTCP message is implemented as a <code>PRIVMSG</code> or <code>NOTICE</code> 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 <code>NOTICE</code> as the standard should not generate a reply, CTCP messages are sent as <code>PRIVMSG</code> and the reply is implemented with a <code>NOTICE</code> instead of a <code>PRIVMSG</code>. A CTCP query is initiated on most clients as follows: <pre>CTCP <target> <command> <arguments></pre> Where ''<target>'' is the target nickname or channel, ''<command>'' is the CTCP command (e.g. <code>VERSION</code>), and ''<arguments>'' are additional information to be sent to the ''<target>''. ==Common CTCP commands== {{Transcluded section|source=Direct Client-to-Client|part=true}} CTCP commands and replies are client-specific; as such, depending on the IRC client, some of the following CTCP commands may not trigger a response, or will be formatted differently than what is shown here. ===VERSION=== A <code>CTCP VERSION</code> request will return the name and version of the IRC client the target is using, and in some cases technical information such as the [[operating system]], [[clock rate]], [[CPU|CPU Manufacturer]] and [[CPU architecture]]/[[instruction set]]. A sample reply for a <code>CTCP VERSION</code> request to a target that uses the [[HexChat]] client is: <pre>VERSION HexChat 2.9.1 [x86] / Windows 8 [1.46GHz]</pre> ===TIME=== A <code>CTCP TIME</code> request will return the [[Time zone|local time]] of the target computer. Depending on the IRC client, the reply may consist of the [[Calendar date|date]], the [[time zone|time]] (either in [[12-hour clock|12-hour format]] or [[24-hour clock|24-hour format]]), the [[year]] (e.g. 2012), and sometimes the [[time zone]] (e.g. [[Eastern Standard Time (North America)|EST]]). A sample reply for a <code>CTCP TIME</code> request to a target that uses the [[ChatZilla]] client is: <pre>TIME Fri 23 Nov 2012 19:26:42 EST</pre> ===PING=== A <code>CTCP PING</code> request will determine the [[Ping (networking utility)|ping rate]] that directly exists between two clients (i.e. discounting the server). The <code>CTCP PING</code> command works by sending an (often) [[Integer (computer science)|integer]] [[Argument (computer science)|argument]] (a [[timestamp]]) to a target client, the target client then responds by supplying exactly the same numerical parameter. The [[subtraction|difference]] between the original timestamp and the current timestamp is calculated, with the result being displayed to the user that initiated the ''CTCP PING''. More often than not, a timestamp that utilises [[milliseconds]] is used due to the majority of users with [[broadband]] Internet connections having a ping under 1 second. A sample <code>CTCP PING</code> request to target ''<nickname>'' from the [[XChat]] client is: <pre>CTCP PING 23152511</pre> Likewise, sample output generated from the difference (see above) is: <pre>Ping reply from <nickname>: 0.53 second(s)</pre> {{Trim|{{#section-h:Direct Client-to-Client|Common DCC applications}}}} ==See also== * [[Internet Relay Chat]] (IRC) * [[Internet Relay Chat#Clients|IRC client]] * [[Comparison of Internet Relay Chat clients]] * [[Direct Client-to-Client|DCC]] (Direct Client-to-Client) ==References== {{reflist}} ==External links== * [http://www.irchelp.org/irchelp/rfc/ctcpspec.html CTCP Details] <!-- [http://www.cybernexus.biz/irc/concise.htm IRC RFC Commands] //--> {{IRC topics}} [[Category:IRC]] [[Category:Internet terminology]] [[Category:Protocols related to IRC]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Citation needed
(
edit
)
Template:Cite book
(
edit
)
Template:Dead link
(
edit
)
Template:IRC topics
(
edit
)
Template:Multiple issues
(
edit
)
Template:Reflist
(
edit
)
Template:Short description
(
edit
)
Template:Transcluded section
(
edit
)
Template:Trim
(
edit
)