Internet Relay Chat (IRC) is a form of real-time Internet text messaging (chat) or synchronous conferencing. It is mainly designed for group communication in discussion forums, called ''channels'', but also allows one-to-one communication via private message as well as chat and data transfer, including file sharing.
IRC was created in 1988. Client software is now available for every major operating system that supports Internet access. As of April 2011, the top 100 IRC networks served more than half a million users at a time, with hundreds of thousands of channels operating on a total of roughly 1,500 servers out of roughly 3,200 servers worldwide.
==History ==
IRC was created by Jarkko Oikarinen in August 1988 to replace a program called MUT (MultiUser Talk) on a BBS called OuluBox in Finland. Oikarinen found inspiration in a chat system known as Bitnet Relay, which operated on the BITNET.
IRC was used to report on the 1991 Soviet coup d'état attempt throughout a media blackout. It was previously used in a similar fashion during the Gulf War. Logs of these and other events are kept in the ibiblio archive.
Technical information
IRC is an open
protocol that uses
TCP and optionally
TLS. An
IRC server can connect to other IRC servers to expand the IRC network. Users access IRC networks by connecting a client to a server. There are many client implementations such as
mIRC or
XChat and server implementations, e.g. the original
IRCd. Most IRC servers do not require users to register an account but a user will have to set a nickname before being connected.
IRC was originally a plain text protocol (although later extended), which on request was assigned port 194/TCP by IANA. However, the de facto has always been to run IRC on 6667/TCP and nearby port numbers (for example TCP ports 6660-6669, 7000) to avoid having to run the IRCd software with root privileges.
The protocol specified that characters were 8-bit but did not specify the character encoding the text was supposed to use. This can cause problems when users using different clients and/or different platforms want to converse.
All client-to-server IRC protocols in use today are descended from the protocol implemented in the irc2.4.0 version of the IRC2 server, and documented in RFC 1459. Since RFC 1459 was published, the new features in the irc2.10 implementation led to the publication of several revised protocol documents (RFC 2810, RFC 2811, RFC 2812 and RFC 2813); however, these protocol changes have not been widely adopted among other implementations.
Although many specifications on the IRC protocol have been published, there is no official specification, as the protocol remains dynamic. Virtually no clients and very few servers rely strictly on the above RFCs as a reference.
Microsoft made an extension for IRC in 1998 via the proprietary IRCX. They later stopped distributing software supporting IRCX, instead developing the proprietary MSN .NET Messenger Service.
New protocol IRCwx (IRC web extension) inspired by IRCX is made by net-bits.net in an attempt to modernize IRCX for web use.
The standard structure of a network of IRC servers is a tree. Messages are routed along only necessary branches of the tree but network state is sent to every server and there is generally a high degree of implicit trust between servers. This architecture has a number of problems. A misbehaving or malicious server can cause major damage to the network and any changes in structure, whether intentional or a result of conditions on the underlying network, require a net-split and net-join. This results in a lot of network traffic and spurious quit/join messages to users and temporary loss of communication to users on the splitting servers. Adding a server to a large network means a large background bandwidth load on the network and a large memory load on the server. Once established however, each message to multiple recipients is delivered in a fashion similar to multicast, meaning each message travels a network link exactly once. This is a strength in comparison to non-multicasting protocols such as Simple Mail Transfer Protocol (SMTP) or Extensible Messaging and Presence Protocol (XMPP).
Commands and replies
IRC is based on a line-based structure with the client sending single-line messages to the server, receiving replies to those messages and receiving copies of some messages sent by other clients. In most clients users can enter commands by prefixing them with a '/'. Depending on the command, these may either be handled entirely by the client, or (generally for commands the client does not recognize) passed directly to the server, possibly with some modification.
Due to the nature of the protocol automated systems cannot always correctly pair a sent command with its reply with full reliability and are subject to guessing.
Channels
The basic means of communicating to a group of users in an established IRC session is through a ''
channel''. Channels on a network can be displayed using the IRC command ''LIST'' that lists all currently available channels, that do not have the modes +s or +p set, on that particular network.
Users can ''join'' to a channel using the ''JOIN'' command, in most clients available as ''/join #channelname''. Messages sent to the joined channels are then relayed to all other users. Other non-standard and less common channel types include '+' channels—'modeless' channels without operators — and '!' channels, a form of timestamped channel on normally non-timestamped networks.
Modes
Users and channels may have ''modes'' that are represented by single case-sensitive letters and are set using the ''MODE'' command. User modes and channel modes are separate and can use the same letter to mean different things (e.g. usermode "i" is invisible mode whilst channelmode "i" is invite only.) Modes are usually set and unset using the mode command that takes a target (user or channel), a set of modes to set (+) or unset (-) and any parameters the modes need.
Some but not all channel modes take parameters and some channel modes apply to a user on a channel or add or remove a mask (e.g. a ban mask) from a list associated with the channel rather than applying to the channel as a whole. Modes that apply to users on a channel have an associated symbol that is used to represent the mode in names replies (sent to clients on first joining a channel and use of the names command) and in many clients also used to represent it in the client's displayed list of users in a channel or to display an own indicator for a user's modes.
In order to correctly parse incoming mode messages and track channel state the client must know which mode is of which type and for the modes that apply to a user on a channel which symbol goes with which letter. In early implementations of IRC this had to be hard-coded in the client but there is now a de-facto standard extension to the protocol called ISUPPORT that sends this information to the client at connect time using numeric 005.
There is a small design fault in IRC regarding modes that apply to users on channels, the names message used to establish initial channel state can only send one such mode per user on the channel, but multiple such modes can be set on a single user. For example, if a user holds both operator status (+o) and voice status (+v) on a channel, a new client will be unable to know the less precedented mode (voice). Workarounds for this are possible on both the client and server side but none is widely implemented.
Standard (RFC1459) modes
+ User modes
|
! Letter
|
! Symbol
|
! Description
|
i
|
|
Invisible—cannot be seen without a common channel or knowing the exact name
|
s
|
|
Receives server notices
|
w
|
|
Receives wallops
|
o
|
|
User is an IRC operator (ircop)
|
+ Channel modes
|
! Letter
|
! Symbol
|
! Parameter(s)
|
! Description
|
o
|
@
|
Name of affected user
|
Channel operator—can change channel modes and kick users out of the channel among other things
|
s
|
|
|
Secret channel—not shown in channel list or user whois except to users already on the channel
|
p
|
|
|
Private channel—listed in channel list as "prv" according to RFC 1459
|
n
|
|
|
Users cannot send messages to the channel externally
|
m
|
|
|
Channel is moderated (only those who hold operator or voice status on the channel can send messages to it)
|
i
|
|
|
Only users with invites may enter the channel.
|
t
|
|
|
Only operators can change the channel topic.
|
l
|
|
Limit number
|
Limits number of users able to be on channel (when full, no new users can join)
|
b
|
|
Ban mask (nick!user@host with wildcards allowed)
|
Bans hostmasks from channel
|
v
|
+
|
Name of affected user
|
Gives a user voice status on channel (see +m above)
|
k
|
None
|
New channel key
|
Sets a channel key such that only users knowing the key can enter
|
Many IRCd programmers have added extra modes or modified the behavior of modes in the above list so it is strongly advisable to check the documentation of the IRC network or IRCd (though note that the network may have patched the IRCd) for more detailed information on what the modes do on a particular server or network.
IRC operators
There are also users who maintain elevated rights on their local server, or the entire network; these are called
IRC operators, sometimes shortened to IRCops. As the implementation of the IRCd varies, so do the privileges of the IRC operator on the given IRCd. RFC1459 claims that IRC operators are "a necessary evil" to keep clean state of the network, as such they need to be able to disconnect and reconnect servers. Additionally, to prevent malicious users or even harmful automated programs from entering IRC, IRC operators usually are allowed to disconnect Clients and completely ban IPs and complete subnets. Networks that carry services (Nickserv et al.) usually allow their IRC operators also to handle basic "Ownership" matters. Further privileged rights may include overriding channel bans (being able to join channels they would not be allowed to join, if they were not opered), being able to op themselves on channels where they would not be able without being opered, being auto-opped on channels always and so forth.
An ''IRC Channel Operator'' is a client on an IRC channel that manages the channel.
IRC Channel Operators Can be easily seen by a symbol "@" or a Latin letter "+o"/"o".
On most networks, an operator can:
Kick a user
Ban a user
Give other user IRC Channel Operator Status or IRC Channel Voice Status.
Change the IRC Channel topic.
Change the IRC Channel Mode locks.
Hostmasks
A hostmask is a unique identifier of an IRC
client connected to an IRC
server.
IRC services and
bots can use it to identify the client. The hostmask looks similar to, but should not be confused with an
e-mail address. It is a combination of the nickname,
ident, and hostname. If ident is not available, then the username is used after being prefixed with a
tilde. If the
IP address cannot be resolved to a valid
hostname, then the IP address is used instead.
Challenges
Issues in the original design of IRC were the amount of shared state data being a limitation on its scalability, the absence of unique user identifications leading to the nickname collision problem, lack of protection from netsplits by means of cyclic routing, the trade-off in scalability for the sake of real-time user presence information, protocol weaknesses providing a platform for abuse, no transparent and optimizable message passing, no encryption. Some of these issues have been addressed in ''Modern IRC''.
Attacks
Because IRC connections are usually unencrypted and typically span long time periods, they are an attractive target for
hackers. Because of this, careful security policy is necessary to ensure that an IRC network is not susceptible to an attack such as an
IRC takeover war. IRC networks may also
K-line or
G-line users or networks that have a harming effect.
A small number of IRC servers support SSL connections for security purposes. This helps stop the use of packet sniffer programs to obtain the passwords of IRC users, but has little use beyond this scope due to the public nature of IRC channels. SSL connections require both client and server support (that may require the user to install SSL binaries and IRC client specific patches or modules on their computers). Some networks also use SSL for server to server connections, and provide a special channel flag (such as +S
) to only allow SSL-connected users on the channel, while disallowing operator identification in clear text, to better utilize the advantages that SSL provide.
IRC served as an early laboratory for many kinds of Internet attacks, such as using fake ICMP unreachable messages to break TCP-based IRC connections (nuking) to annoy users or facilitate takeovers.
Abuse prevention
One of the most contentious technical issues surrounding IRC implementations, which survives to this day, is the merit of "Nick/Channel Delay" vs. "Timestamp" protocols. Both methods exist to solve the problem of
denial-of-service attacks, but take very different approaches.
The problem with the original IRC protocol as implemented was that when two servers split and rejoined, the two sides of the network would simply merge their channels. If a user could join on a "split" server, where a channel that existed on the other side of the network was empty, and gain operator status, they would become a channel operator of the "combined" channel after the
netsplit ended; if a user took a nickname that existed on the other side of the network, the server would kill both users when rejoining (i.e., 'nick-collision').
This was often abused to "mass-kill" all users on a channel, thus creating "opless" channels where no operators were present to deal with abuse. Apart from causing problems within IRC, this encouraged people to conduct denial of service attacks against IRC servers in order to cause
netsplits, which they would then abuse.
Nick/channel delay
The nick/channel delay (abbreviated ND/CD) solution to this problem was very simple. After a user signed off and the
nickname became available, or a channel ceased to exist because all its users left (as often happens during a
netsplit), the server would not allow any user to use that nickname or join that channel, until a certain period of time (the ''delay'') had passed. The idea behind this was that even if a
netsplit occurred, it was useless to an abuser because they could not take the nickname or gain operator status on a channel, and thus no collision of a nickname or 'merging' of a channel could occur. To some extent, this inconvenienced legitimate users, who might be forced to briefly use a different name (appending an
underscore was popular) after rejoining.
Timestamping
The alternative, the timestamp or ''TS'' protocol, took a different approach. Every nickname and channel on the network was assigned a timestamp the date and time when it was created. When a netsplit occurred, two users on each side were free to use the same nickname or channel, but when the two sides were joined, only one could survive. In the case of nicknames, the newer user, according to their TS, was killed; when a channel collided, the members (users on the channel) were merged, but the channel operators on the "losing" side of the split lost their channel operator status.
TS is a much more complicated protocol than ND/CD, both in design and implementation, and despite having gone through several revisions, some implementations still have problems with "desyncs" (where two servers on the same network disagree about the current state of the network), and allowing too much leniency in what was allowed by the 'losing' side. Under the original TS protocols, for example, there was no protection against users setting bans or other modes in the losing channel that would then be merged when the split rejoined, even though the users who had set those modes lost their channel operator status. Some modern TS-based IRC servers have also incorporated some form of ND and/or CD in addition to timestamping in an attempt to further curb abuse.
Most networks today use the timestamping approach. The timestamp versus ND/CD disagreements caused several servers to split away from
EFnet and form the newer
IRCnet. After the split, EFnet moved to a TS protocol, while IRCnet used ND/CD.
SAVE
In recent Versions of the ircnet IRCd, ND has been extended/replaced by a mechanism called SAVE. This mechanism assigns every client a unique UID upon connecting to an IRC Server. This ID starts with a number, which is forbidden in nicks. Clients may now choose to use their UID or any free nick; however, if two clients with the same nickname are joined from different sides of a netsplit ("Collision"), the first server to see this collision will force BOTH clients to change their nick to their UID, thus SAVEing both clients from being disconnected. The nickname will be locked for some time (ND) to prevent both clients to change to the original nickname back, thus colliding again.
Networks
There are thousands of running IRC networks in the world. They run various implementations of
IRC servers, and are administered by various groups of
IRC operators, but the protocol exposed to IRC users is very similar, and all IRC networks can be accessed by the same client software, although there might be slight incompatibilities and limited functionality due to the differing server implementations.
The largest IRC networks have traditionally been grouped as the "Big Four" a designation for networks that top the statistics. The Big Four networks change periodically, but due to the community nature of IRC there are a large number of other networks for users to choose from.
Historically the "Big Four" were:
EFnet
IRCnet
Undernet
DALnet
Today the "Big Four" are:
EFnet
IRCnet
QuakeNet
Undernet
''freenode'' is quite popular with community-based projects, especially free and open source software projects. Many users of various FOSS projects use ''freenode'' since a lot of these projects have official IRC channels there.
URI scheme
There is an irc:
URI scheme that (when supported) allows
hyperlinks of various forms, including
irc://[:]/[[?]]
(where items enclosed within brackets ([,]) are optional) to be used to (if necessary) connect to the specified host (or network, if known to the IRC client) and join the specified channel. (This can be used within the client itself, or from another application such as a Web browser).
Per the specification, the usual hash symbol (#) will be prepended to channel names that do not begin with an alphanumeric character—allowing it to be omitted. Some implementations (for example, mIRC) will do so ''unconditionally'' resulting in a (usually unintended) extra (for example, ##channel), if included in the URL.
Some implementations allow multiple channels to be specified, separated by commas.
Clients
Client software
In different operating systems, some of the most popular clients are:
Windows: mIRC, Miranda IM, Trillian, Pidgin, KVIrc, and XChat.
Unix and Linux: Quassel, Kopete, irssi, XChat, Konversation, KVIrc, Pidgin, and the traditional ircII and derivatives.
For Mac OS X: Snak, Ircle, Adium and Colloquy. OS X can also run most Unix-like command line and X11 IRC clients.
For iPad and iPhone: Colloquy,
For Android: androIRC, Andchat, DaraIRC, fIRC chat, IRC radio, Yaaic, AiCiA, Droid-Life IRC,...
The higher level programs also serve as platforms for the IRC clients. For instance,
a client called ERC, written entirely in Emacs Lisp is included in v.22.3 of Emacs. Therefore, any platform that can run Emacs can run ERC.
There are a number of Web browsers with built in IRC clients.
Opera has a built in IRC client. To
Mozilla Firefox,
ChatZilla add-on can be installed. Web based clients include
Mibbit,
qwebirc and
WebIRC.
Built-in IRC is utilized by many computer games, such as ''
War§ow'', ''
Unreal Tournament'' (up to
Unreal Tournament 2004), ''
Uplink'', ''
Spring Games'' and ''
ZDaemon''.
Ustream's chat interface is
IRC with custom authentication.
Justin.tv's chat interface is
IRC with custom authentication as with
Ustream's.
Bots
Automated clients are called
bots. As bots evolved, they began to serve as permanent points of contact for information exchange and protection agents for the channels they served, because of their superior speed when compared to humans. Presently, although many of these functions are often delegated to network-provided
services that allow for registration and management of both nicknames and channels, bots remain popular and continue to be adapted to new and unexpected tasks.
Bots have been written in a variety of languages, and a wide array of implementations exist. Most modern IRC services typically implement bot-like interfaces, through which users can communicate with and control the functionality. Bots have also been created for malevolent uses, such as flooding or taking over channels, ousting their rightful owners.
Bouncer
A program that runs as a
daemon on a
server and functions as a persistent
proxy is known as a BNC or bouncer. The purpose is to maintain a connection to an IRC server, acting as a relay between the server and client, or simply to act as a proxy. Should the client lose network connectivity, the BNC may stay connected and archive all traffic for later delivery, allowing the user to resume his IRC session without disrupting their connection to the server.
Furthermore, as a way of obtaining a bouncer-like effect, an IRC client (typically text-based, for example Irssi) may be run on an always-on server to which the user connects via ssh. This also allows devices that only have ssh functionality, but no actual IRC client installed themselves, to connect to the IRC, and it allows sharing of IRC sessions.
To keep the IRC client from quitting when the ssh connection closes, the client can be run inside a piece of screen-detaching software (e.g. GNU Screen or tmux), thus staying connected to the IRC network(s) constantly and able to log conversation in channels that the user is interested in, etc. Modelled after this setup, in 2004 an IRC client following the client-server model, called Smuxi, has been launched.
Search engines
There are numerous search engines available to aid the user in finding what they are looking for on IRC. Generally the search engine consists of two parts, a "back-end" (or "spider/crawler") and a front-end "search engine".
The back-end (spider/crawler) is the work horse of the search engine. It is responsible for crawling IRC servers to index the information being sent across them. The information that is indexed usually consists solely of channel text (text that is publicly displayed in public channels). The storage method is usually some sort of relational database, like MySQL or Oracle.
The front-end "search engine" is the user interface to the database. It supplies users with a way to search the database of indexed information to retrieve the data they are looking for. These front-end search engines can also be coded in numerous programming languages. The more popular languages for such search engines and indexing spiders are Perl, PHP and C.
Most search engines have their own spider that is a single application responsible for crawling IRC and indexing data itself; however, others are "user based" indexers. The latter rely on users to install their "add-on" to their IRC client; the add-on is what sends the database the channel information of whatever channels the user happens to be on. IRC search engines have completely automated the process of finding information on IRC and have thus contributed greatly to the popularity of IRC in recent years.
Modern IRC
IRC has changed much over its life on the Internet. New server software has added a multitude of new features.
Services: Network-operated bots to facilitate registration of nicknames and channels, sending messages for offline users and network operator functions.
Extra modes: While the original IRC system used a set of standard user and channel modes, new servers add many new modes for such features as removing color codes from text, or obscuring a user's
hostmask ("cloaking") to protect from
denial-of-service attacks.
Proxy detection: Most modern servers support detection of users attempting to connect through an insecure (misconfigured or exploited)
proxy server, which can then be denied a connection. An example is the
Blitzed Open Proxy Monitor or BOPM. This proxy detection software is used by several networks, although that real time list of proxies is defunct since early 2006.
Additional commands: New commands can be such things as shorthand commands to issue commands to Services, to network operator only commands to manipulate a user's hostmask.
Encryption: For the client-to-server leg of the connection
SSL might be used (messages cease to be secure once they are relayed to other users on standard connections, but it makes
eavesdropping on or wiretapping an individual's IRC sessions difficult). For client-to-client communication,
SDCC (Secure DCC) can be used.
Connection protocol: IRC can be connected to via IPv4, the current standard version of the Internet Protocol, or by IPv6, the next-generation version of the protocol.
Web-based account registrations and user profile pages: An example is IRCwx.
Character encoding
IRC still lacks a single globally accepted standard convention for how to transmit characters outside the 7-bit
ASCII repertoire.
IRC servers normally transfer messages from a client to another client just as byte sequences, without any interpretation or recoding of
characters. The IRC protocol (unlike e.g.
MIME or
HTTP) lacks mechanisms for announcing and negotiation character encoding options. This has put the responsibility for choosing the appropriate character codec on the client. In practice, IRC channels have largely used the same character encodings that were also used by operating systems (in particular
Unix derivatives) in the respective language communities:
7-bit era: In the early days of IRC, especially among Scandinavian and Finnish language users, national variants of ISO 646 were the dominant character encodings. These encode non-ASCII characters like Ä Ö Å ä ö å at code positions 0x5B 0x5C 0x5D 0x7B 0x7C 0x7D (US-ASCII: [ \ ] { | }). That is why these codes are always allowed in nicknames. According to RFC 1459, { | } in nicknames should be treated as lowercase equivalents of [ \ ] respectively. By the late 1990s, the use of 7-bit encodings had disappeared in favour of ISO 8859-1, and such equivalence mappings were dropped from some IRC daemons.
8-bit era: Since the early 1990s, 8-bit encodings such as ISO 8859-1 have become commonly used for European languages. Russian users had a choice of KOI8-R, ISO 8859-5 and CP1251, and since about 2000, modern Russian IRC networks convert between these different commonly used encodings of the Cyrillic alphabet.
Multi-byte era: East Asian IRC channels with ideographic scripts in China, Japan, and Korea have used for a long time multi-byte encodings such as EUC or ISO-2022-JP. With the common migration from ISO 8859 to UTF-8 on Linux and Unix platforms since about 2002, UTF-8 has become an increasingly popular substitute for many of the previously used 8-bit encodings in European channels. Some IRC clients are now capable of reading messages both in ISO 8859-1 or UTF-8 in the same channel, heuristically autodetecting which encoding is used. The shift to UTF-8 began in particular on Finnish-speaking IRC (:fi:IRC#Merkistö (Finnish)).
Today, the UTF-8 encoding of Unicode/ISO 10646 would be the most likely contender for a single future standard character encoding for all IRC communication, if such standard ever relaxed the 510 bytes message size restriction. UTF-8 is ASCII compatible and covers the superset of all other commonly used coded character set standards.
File sharing
Much like conventional
P2P file sharing, users can create file servers that allow them to share files with each other by using customised
IRC bots or scripts for their
IRC client. Often users will group together to distribute
warez via a network of IRC bots.
Technically, IRC provides no file transfer mechanisms itself; file sharing is implemented by IRC ''clients'', typically using the Direct Client-to-Client (DCC) protocol, in which file transfers are negotiated through the exchange of private messages between clients. The vast majority of IRC clients feature support for DCC file transfers, hence the view that file sharing is an integral feature of IRC. The commonplace usage of this protocol, however, sometimes also causes DCC spam. DCC commands have also been used to exploit vulnerable clients into performing an action such as disconnecting from the server or exiting the client.
See also
Chat room
Client-to-client protocol
Comparison of instant messaging protocols
Comparison of IRC clients
Comparison of IRC daemons
Comparison of IRC services
Internet slang
List of IRC commands
Serving channel
References
Bibliography
Further reading
External links
IRC.org - Technical and Historical IRC6 information; Articles on the history of IRC
IRChelp.org - Internet Relay Chat (IRC) help archive; Large archive of IRC-related documents
IRC/2 Numerics List
History of IRC
Category:Virtual communities
Category:On-line chat
Category:Application layer protocols
Category:Internet terminology
af:IRC
ar:آي آر سي
az:Internet Relay Chat
bn:ইন্টারনেট রিলে চ্যাট
be:IRC
be-x-old:IRC
bs:Internet Relay Chat
br:IRC
bg:Internet Relay Chat
ca:IRC
cs:Internet Relay Chat
cy:IRC
da:IRC
de:Internet Relay Chat
el:Internet Relay Chat
es:Internet Relay Chat
eo:Interreta relajsa babilo
eu:IRC
fa:آیآرسی
fr:Internet Relay Chat
gl:IRC
ko:인터넷 릴레이 챗
hi:आइआरसी
hr:IRC
io:Internet Relay Chat
id:Saling Bual Internet
ia:Internet Relay Chat
is:Internet Relay Chat
it:Internet Relay Chat
he:Internet Relay Chat
sw:IRC
lv:IRC
lt:IRC
lmo:Internet Relay Chat
hu:Internet Relay Chat
ms:IRC
nl:Internet Relay Chat
ja:Internet Relay Chat
no:IRC
nn:Internet Relay Chat
pl:Internet Relay Chat
pt:Internet Relay Chat
ro:IRC
ru:IRC
sah:Irc
sq:Internet Relay Chat
simple:Internet Relay Chat
sk:Internet Relay Chat
sl:Internet Relay Chat
sr:ИРЦ
sh:IRC
fi:IRC
sv:IRC
th:ไออาร์ซี
tg:IRC
tr:Internet Relay Chat
uk:IRC
vi:IRC
yo:Internet Relay Chat
zh:IRC