CTCP VERSION
), or the time (via CTCP TIME
), among other things. It is also used to implement the /me command (via CTCP ACTION
).
History
ircII was the first IRC client to implement the CTCP and DCC protocols. The CTCP protocol was implemented by Michael Sandrof in 1990 for ircII version 2.1, while the DCC protocol was implemented by Troy Rollo in 1991 for version 2.1.2.See the 'UPDATES' and 'source/dcc.c' files included witStructure
A CTCP message is implemented as aPRIVMSG
or NOTICE
where the first and last characters of the message are NOTICE
as the standard should not generate a reply, CTCP messages are sent as PRIVMSG
and the reply is implemented with a NOTICE
instead of a PRIVMSG
.
A CTCP query is initiated on most clients as follows:
CTCPWhere ''
VERSION
), and ''Common CTCP commands
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
ACTCP VERSION
request will return the name and version of the IRC client the target is using, and in some cases technical information such as the CTCP VERSION
request to a target that uses the HexChat client is:
VERSION HexChat 2.9.1 86/ Windows 8 .46GHz/pre>
TIME
ACTCP TIME
request will return the local time of the target computer. Depending on the IRC client, the reply may consist of the date, thetime Time is the continued sequence of existence and events that occurs in an apparently irreversible succession from the past, through the present, into the future. It is a component quantity of various measurements used to sequence events, t ...(either in 12-hour format or24-hour format The modern 24-hour clock, popularly referred to in the United States as military time, is the convention of timekeeping in which the day runs from midnight to midnight and is divided into 24 hours. This is indicated by the hours (and minutes) pas ...), theyear A year or annus is the orbital period of a planetary body, for example, the Earth, moving in its orbit around the Sun. Due to the Earth's axial tilt, the course of a year sees the passing of the seasons, marked by change in weather, the ...(e.g. 2012), and sometimes thetime zone A time zone is an area which observes a uniform standard time for legal, commercial and social purposes. Time zones tend to follow the boundaries between countries and their subdivisions instead of strictly following longitude, because i ...(e.g. EST). A sample reply for aCTCP TIME
request to a target that uses the ChatZilla client is:TIME Fri 23 Nov 2012 19:26:42 EST
PING
ACTCP PING
request will determine the ping rate that directly exists between two clients (i.e. discounting the server). TheCTCP PING
command works by sending an (often)integer An integer is the number zero (), a positive natural number (, , , etc.) or a negative integer with a minus sign ( −1, −2, −3, etc.). The negative numbers are the additive inverses of the corresponding positive numbers. In the language ...argument An argument is a statement or group of statements called premises intended to determine the degree of truth or acceptability of another statement called conclusion. Arguments can be studied from three main perspectives: the logical, the dialect ...(atimestamp A timestamp is a sequence of characters or encoded information identifying when a certain event occurred, usually giving date and time of day, sometimes accurate to a small fraction of a second. Timestamps do not have to be based on some absolut ...) to a target client, the target client then responds by supplying exactly the same numerical parameter. The 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 utilisesmilliseconds A millisecond (from '' milli-'' and second; symbol: ms) is a unit of time in the International System of Units (SI) equal to one thousandth (0.001 or 10−3 or 1/1000) of a second and to 1000 microseconds. A unit of 10 milliseconds may be ca ...is used due to the majority of users withbroadband In telecommunications, broadband is wide bandwidth data transmission which transports multiple signals at a wide range of frequencies and Internet traffic types, that enables messages to be sent simultaneously, used in fast internet connections. ...Internet connections having a ping under 1 second. A sampleCTCP PING
request to target '''' from the XChat client is: CTCP PING 23152511Likewise, sample output generated from the difference (see above) is:Ping reply from: 0.53 second(s)
See also
*Internet Relay Chat Internet Relay Chat (IRC) is a text-based chat system for instant messaging. IRC is designed for group communication in discussion forums, called '' channels'', but also allows one-on-one communication via private messages as well as chat a ...(IRC) * IRC client * Comparison of Internet Relay Chat clients * DCC (Direct Client-to-Client)
References
External links
CTCP Details
//--> {{IRC topics Internet Relay Chat Internet terminology Protocols related to Internet Relay Chat