Internet Relay Chat
From Wikipedia, the free encyclopedia
- For IRC channels dedicated to Wikipedia, see Wikipedia:IRC channels.
Internet Relay Chat (IRC) is a form of real-time Internet 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 transfers via Direct Client-to-Client.
IRC was created by Jarkko Oikarinen in late 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 gained prominence[citation needed] when it was used to report on the Soviet coup attempt of 1991 throughout a media blackout. It was previously used in a similar fashion during the Iraqi invasion. Relevant logs are available from ibiblio archive[1].
IRC client software is available for virtually every computer operating system.
The five-layer TCP/IP model |
---|
5. Application layer |
DHCP · DNS · FTP · Gopher · HTTP · IMAP4 · IRC · NNTP · XMPP · POP3 · RTP · SIP · SMTP · SNMP · SSH · TELNET · RPC · RTCP · RTSP · TLS (and SSL) · SDP · SOAP · GTP · STUN · NTP · BGP · (more) |
4. Transport layer |
TCP · UDP · DCCP · SCTP · RSVP · ECN · (more) |
3. Network/internet layer |
IP (IPv4 · IPv6) · OSPF · IS-IS · IPsec · ARP · RARP · RIP · ICMP · ICMPv6 · IGMP · (more) |
2. Data link layer |
802.11 (WLAN) · 802.16 · Wi-Fi · WiMAX · ATM · DTM · Token ring · Ethernet · FDDI · Frame Relay · GPRS · EVDO · HSPA · HDLC · PPP · PPTP · L2TP · ISDN · ARCnet · LLTD · (more) |
1. Physical layer |
Ethernet physical layer · RS-232 · SONET/SDH · G.709 · Optical fiber · Coaxial cable · Twisted pair · (more) |
Contents |
[edit] 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 and server implementations, such as mIRC and the Bahamut IRCd. Most IRC servers do not require users to log in, but a user will have to set a nickname before being connected.
IRC was originally a plain text protocol (although later extended),[2] 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 to avoid having to run the IRCd software with root privileges. It is possible (though quite inconvenient) to use IRC via a basic byte-stream client such as netcat or telnet.
The protocol specified that characters were 8 bit but did not specify the character encoding the text was supposed to use.[3] 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.8 version of the IRC2server, 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[citation needed].
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[citation needed].
Microsoft made an extension for IRC in 1998[4] via the proprietary IRCX. They later stopped distributing software supporting IRCX, instead developing the proprietary MSN .NET Messenger Service.
The standard structure of a network of IRC servers is a tree (acyclic graph). 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. 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 by multicast. That means each message travels a network link exactly once. This is a strength in comparison to non-multicasting protocols such as SMTP or XMPP.
For a discussion of the evolution of server-side IRC protocols and the various IRCd incarnations, see the separate article on IRC daemons.
[edit] 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 /. Depending on the command, these may either be handled entirely by the client, or - generally for commands the client does not recognise - passed directly to the server, possibly with some modification.
Due to the nature of the protocol, it is impossible for automated systems to pair a sent command with its reply.
[edit] Channels
The basic means of communication in an established IRC session is a channel. Channels in a server can be displayed using the command /list [#string] [-min #] [-max #] that lists all currently available channels, optionally filtering for parameters (#string for the entire or part of the name, with wildcards, and #min / #max for number of users in the channel).
Users can join to a channel using the command /join #channelname and send messages to it, which are relayed to all other users on the same channel.
Channels that are available across an entire IRC network are prepended with a ' # ', while those local to a server use '&'. 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.
[edit] Modes
Users and channels may have modes, which 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 which 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 which 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 most clients to represent it in this list of users in the channel.
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 which sends this information to the client at connect time.
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 are widely implemented.
Standard (rfc1459) modes | ||||||
---|---|---|---|---|---|---|
User modes | Channel modes | |||||
Letter | Description | Letter | Symbol | Parameter | Description | |
i | Invisible — cannot be seen without a common channel or knowing the exact name | o | @ | Name of affected user | Channel operator — can change channel modes and kick users out of the channel among other things | |
s | Receives server notices | p | None | None | Private channel — listed in channel list as "prv" according to rfc1459 | |
w | Receives wallops | s | None | None | Secret channel — not shown in channel list or user whois except to users already on the channel | |
o | User is an IRC operator (ircop) | i | None | None | Invite only — users can only join if invited by another user on that specific channel | |
t | None | None | Topic only settable by channel operators | |||
n | None | None | Users cannot send external messages from outside the channel | |||
m | None | None | Channel is moderated (only those who hold operator or voice status on the channel can send messages to it) | |||
l | None | Limit number | Limits number of users able to be on channel (when full, no new users can join) | |||
b | None | 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.
[edit] 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. On some IRC implementations, IRC operators are also given channel operator status in every channel, although many people believe that administration of channels and administration of the network should be kept separate, and that IRC operator status does not confer the right to interfere with a particular channel's operation.
[edit] Challenges
Issues in the original design of IRC were the amount of shared state data[5] being a limitation on its scalability[6], the absence of unique user identifications leading to the nickname collision problem[7], lack of protection from netsplits by means of cyclic routing[8][9], the trade-off in scalability for the sake of real-time user presence information[10], protocol weaknesses providing a platform for abuse[11], no transparent and optimizable message passing[12], no encryption[13]. Some of these issues have been addressed in Modern IRC.
[edit] Attacks
Because IRC connections are usually unencrypted and typically span long time periods, they are an attractive target for malicious crackers. 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 (which may require the user to install SSL binaries and IRC client specific patches or modules on their computers).
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.
[edit] Abuse prevention: timestamping vs. nick/channel delay protocol
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 which 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 which 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.
[edit] 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, respectively, 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.
[edit] 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 which 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.
[edit] 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.
One can join servers by clicking on an irc://irc.network.example:port/channel hyperlink.
The largest IRC networks have traditionally been grouped in 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.
The Big Four:
For network statistics, rankings, and a list of smaller networks, see netsplit.de, Search IRC and Gogloom. For other articles on IRC networks, see Category:IRC networks.
[edit] Clients
[edit] Client software
-
For more details on this topic, see Comparison of Internet Relay Chat clients.
To connect to an IRC network, people most commonly will connect to an IRC network via an IRC client. The client takes the raw IRC traffic and turns it into an easy-to-use interface.
There are a great deal of IRC clients available, and are mostly separated by operating system. On Windows-based systems, one of the most popular IRC clients is mIRC.[14] However, with the recent introduction of new clients such as Bersirc, KVIrc, Trillian, Pidgin, Visual IRC, ChatIRC, IceChat and X-Chat, mIRC is beginning to see much more competition, especially with clients that are not commercial. Many people still use mIRC most likely due to the fact that it has been around for quite some time and has a wide variety of scripts available.
ircII is the canonical Unix and Linux IRC client, but its userbase has declined with the appearance of competing clients such as ircII-EPIC, BitchX, irssi, X-Chat, Konversation, etc. For Mac OS X, the most widely used clients are Snak, Ircle and Colloquy. OS X can also run most Unix-like command line and X11 IRC clients. Recently, X-Chat Aqua, a special build of X-Chat, has been gaining ground on OS X systems. Amiga IRC clients are AmIRC, WookieChat, BenderIRC. Amongst AmigaOS clones there is MomosIRC for MorphOS.
There are a number of Internet browsers with IRC clients. Opera has a built in IRC client. Mozilla Firefox does not have a built-in IRC client, though ChatZilla, a Firefox add-on, can be installed to provide access to IRC in the browser. Chatzilla is part of the SeaMonkey internet suite.
Built in IRC is utilized by many computer games, such as War§ow, Unreal Tournament, Uplink, World of Warcraft, Zdaemon and EVE Online. The SoulSeek file sharing network is based on IRC.
For novice users, mIRC and other large-window clients can seem unnecessarily large and complex. New users may prefer instant messaging clients like Miranda IM, Pidgin or Trillian that support IRC and provide a familiar interface to the application. Alternatively web based clients such as Mibbit and webirc provide an easy way for people to access IRC.
Few clients exist for DOS, examples of which are LeetIRC and Trumpet.
[edit] 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 which 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, occupying them from rightful owner.
[edit] Bouncer
A program that runs as a daemon on a server and functions as a persistent proxy is known as a bouncer. A bouncer's purpose is to maintain a connection to an IRC server, acting as a relay between the server and client. Should the client lose network connectivity, the bouncer will 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, the old UNIX user's way of doing this is to run a (typically text-based) client on a remote server, inside a piece of screen-detaching software (e.g. GNU Screen), and using a secure shell to connect to this server, letting it relay all information, and thus letting the client archive all traffic should the connectivity be lost.
[edit] 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 (like mIRC); the add-on is what sends the database the channel information of whatever channel[s] 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.
[edit] 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 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.
- Ident: Provides identification to the IRC server, but in modern Internet that RFC 1413 identification is almost useless.
- 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.
[edit] Internationalization
This article or section needs copy editing for grammar, style, cohesion, tone or spelling. You can assist by editing it now. A how-to guide is available. (June 2008) |
IRC lacks any general convention about interpretation of byte codes other than ASCII, and this topic is poorly documented. Most common practice (in big IRC networks) is to transfer messages from a client to another client opaquely, without any recoding of characters. This puts the responsibility of all internationalization problems on the client.
In early ages of IRC, many users of IRC speaking in Scandinavian and Finnish languages, used some dialects of ISO 646 as the character encoding, which placed letters like Ä Ö Å ä ö å in code points 0x5B 0x5C 0x5D 0x7B 0x7C 0x7D (US-ASCII: [ \ ] { | }). That's why these codes are always allowed in nicknames. According to RFC 1459, { | } in nicknames even should be treated as lowercase equivalents of [ \ ] respectively.[15] In the late 1990s, the use of 7bit code pages was completely abandoned, and such equivalence was dropped in some IRC daemons.
Now IRC in Western languages uses ISO-8859-1 encoding (or its derivatives) or, sometimes, UTF-8. Some IRC clients are capable to read messages both in ISO-8859-1 or UTF-8 in the same channel, detecting proper encoding heuristically. In Finnish-speaking IRC there is some shift to UTF-8 last years (fi:IRC#Merkistö (Finnish)). At least two encodings other than UTF-8 are used for chats in Japanese.
In 2000s a completely alternative approach arose in the Russian-speaking IRC world. Modern Russian-speaking IRC networks consider a message composed of characters (not bytes) and perform required recoding of Cyrillic letters if necessary; see details in ru:IRC#Специфика русскоязычного IRC(Russian). An essential difference between character set issues in Russian and Latin-based scripts is that a message in Latin letters, even misinterpreted (from UTF-8 to ISO-8859 or versa), remains at least partially readable.
[edit] File sharing
Using scripts like Sysreset, UPP, Sooplex, Polaris and, most commonly, OmenServe, users can create file servers that allow them to share files with others. In addition to the normal pros and cons of file-sharing (see Copyright infringement of software), there are also groups that set up anime fansubbing networks, allowing American audiences to see anime that would normally be unavailable in English or outside of Japan.[16]
Due to the large number of people who use IRC for file sharing, some think of IRC as a form of P2P file sharing. Conversely, many users try to defeat this view by persistently discouraging it or refusing to help with it. 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.
[edit] See also
- Comparison of instant messaging protocols
- Comparison of IRC clients
- Comparison of IRC daemons
- Comparison of IRC services
- Chat room
- Chatzilla
- Client-To-Client Protocol
- Direct Client-to-Client
- Ident
- Instant messaging
- IRC Services
- IRCd
- IRCX
- Irssi
- Konversation
- List of IRC commands
- mIRC
- psyBNC
- Serving channel
- vhost (IRC)
- XDCC
[edit] References
- ^ Index of /pub/academic/communications/logs
- ^ IRC RFC
- ^ RFC 1459
- ^ IRCX Protocol Addition Specification
- ^ RFC 1324 2.5.1 Size
- ^ Functionality Provided by Systems for Synchronous Conferencing, 1.2.1 Growth, Loesch 1992-2003
- ^ RFC 1324 5.4.1 User identification
- ^ RFC 1324 5.4.2 Trees and cycles
- ^ Functionality Provided by Systems for Synchronous Conferencing, 1.2.2 Network failures, Loesch 1992-2003
- ^ RFC 1324 2.1 State Information problems
- ^ Functionality Provided by Systems for Synchronous Conferencing, 1.2.3 Sociological and security aspects, Loesch 1992-2003
- ^ RFC 1324 5.2.1 Message passing
- ^ RFC 1324 5.2.4 Conference security
- ^ Schweitzer, Douglas, Internet Relay Chat: IRC the Place to Be?, <http://www.pcflank.com/art32.htm>. Retrieved on 2007-03-25
- ^ RFC 1459, 2.2 Character codes
- ^ http://www.animenewsnetwork.com/feature/2008-03-11
[edit] External links
- IRC.org - Technical and Historical IRC6 information; articles on the history of IRC.
- IRC/2 Numerics List of numeric replies for the IRC protocol.
- Large archive of IRC-related documents, somewhat EFnet biased.
- Living Internet A comprehensive history of the Internet, including IRC.
- RFC 1459 - Technical Information about the IRC Protocol.