Internet Relay Chat

From Wikipedia, the free encyclopedia

Jump to: navigation, search

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 transfers via Direct Client-to-Client.

As of March 2009, the top 100 IRC networks served more than half a million users at a time, with hundreds of thousands of channels (the vast majority of which stand mostly vacant), operating on a total of roughly 1,500 servers world-wide.

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.[citation needed]

IRC was used to report on the Soviet coup attempt of 1991 throughout a media blackout.[1] It was previously used in a similar fashion during the Gulf War. Logs of these events, and other events, are kept in the ibiblio archive.[2]

IRC client software is available for virtually every computer operating system that supports networking.

The Internet Protocol Suite
Application Layer
BGP · DHCP · DNS · FTP · GTP · HTTP · IMAP · IRC · Megaco · MGCP · NNTP · NTP · POP · RIP · RPC · RTP · RTSP · SDP · SIP · SMTP · SNMP · SOAP · SSH · Telnet · TLS/SSL · XMPP · (more)
Transport Layer
TCP · UDP · DCCP · SCTP · RSVP · ECN · (more)
Internet Layer
IP (IPv4, IPv6) · ICMP · ICMPv6 · IGMP · IPsec · (more)
Link Layer
ARP · RARP · NDP · OSPF · Tunnels (L2TP) · Media Access Control (Ethernet, MPLS, DSL, ISDN, FDDI) · Device Drivers · (more)

Contents

[edit] Technical information

A Screenshot of XChat, a cross-platform IRC client.
Xaric, a console based IRC client, in use on Mac OS X. Shown are two IRC channels and a private conversation with the software author.

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, respectively. 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),[3] 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 6112-6119) 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.[4] 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[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[5] 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. 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 recognize - 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. However in most networks, IRC operators usually do not interfere with channel administrations unless they violate the network's terms of service.

[edit] Challenges

Issues in the original design of IRC were the amount of shared state data[6] being a limitation on its scalability,[7] the absence of unique user identifications leading to the nickname collision problem,[8] lack of protection from netsplits by means of cyclic routing,[9][10] the trade-off in scalability for the sake of real-time user presence information,[11] protocol weaknesses providing a platform for abuse,[12] no transparent and optimizable message passing,[13] no encryption.[14] 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

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 and Usage Share

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.

As of March 2009, the top 100 IRC networks served more than half a million users at a time, with hundreds of thousands of channels (the vast majority of which stand mostly vacant), operating on a total of roughly 1,500 servers world-wide.

According statistics by netsplit.de, the top 10 populated networks accounted for 66 per cent of usage in the top 100 populated networks. That is, more than 370,000 users at a time. These networks had an average of just less than 1,500 users per server. The top 20 populated networks, accounted for 77 per cent of usage (again, in the top 100 networks). That is, more than 430,000 users at a time. These networks had an average of a 1,000 users per server. According to this statistics, the top 100 networks served more than 560,000 users at a time, on 1,450 serves, with an average load of 390 users per server.

Statistics from gogloom shows similar results, with more than 570,000 users served at a time. According to this statistics, 78 per cent of users were concentrated on the top 10 networks. That is, more than 450,000 users at a time. Further on, the top 20 networks house 86 per cent of users, with almost half a million users at a time.

According to statistics by Search IRC, as of March 2009, it monitored more than 760,000 users on 650 different networks spread over 7,600 servers. Giving an over all server load of a 100 users per server. Here to 90 percent of the users were concentrated in 250 (a third) of the monitored networks, with the vast majority of networks being small/local with less than 200 users per network


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[citation needed]:

For network statistics, rankings, and a list of smaller networks, see netsplit.de, Search IRC and Gogloom.

[edit] Clients

[edit] Client software

Scheme of an IRC-Network with normal clients (green), bots (blue) and bouncers (orange)

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 many IRC clients available, and are mostly separated by operating system. On Windows-based systems, one of the most popular IRC clients is mIRC.[15] However, with the recent introduction of new clients such as Miranda IM, Bersirc, KVIrc, Trillian, Pidgin, Visual IRC, ChatIRC and XChat, 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.[who?] One of said scripts is NoName Script (NNS) which is a common one to use due to its wide set of features.[16]

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, XChat, 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 XChat, 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.

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.[citation needed]

[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, ousting their rightful owners.

[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] 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 transparently, 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 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.[17] 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[citation needed] 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. 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.

[edit] File sharing

Using scripts like Sysreset, UPP, Sooplex, Polaris, users can create file servers that allow them to share files with others.

Due to the large number of people who use IRC for file sharing[citation needed], 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

[edit] References

  1. ^ IRC logs 1991 IRC transcripts from the time of the 1991 Soviet coup attempt
  2. ^ Index of /pub/academic/communications/logs
  3. ^ IRC RFC
  4. ^ RFC 1459
  5. ^ IRCX Protocol Addition Specification
  6. ^ RFC 1324 2.5.1 Size
  7. ^ Functionality Provided by Systems for Synchronous Conferencing, 1.2.1 Growth, Loesch 1992-2003
  8. ^ RFC 1324 5.4.1 User identification
  9. ^ RFC 1324 5.4.2 Trees and cycles
  10. ^ Functionality Provided by Systems for Synchronous Conferencing, 1.2.2 Network failures, Loesch 1992-2003
  11. ^ RFC 1324 2.1 State Information problems
  12. ^ Functionality Provided by Systems for Synchronous Conferencing, 1.2.3 Sociological and security aspects, Loesch 1992-2003
  13. ^ RFC 1324 5.2.1 Message passing
  14. ^ RFC 1324 5.2.4 Conference security
  15. ^ Schweitzer, Douglas, Internet Relay Chat: IRC the Place to Be?, http://www.pcflank.com/art32.htm, retrieved on 2007-03-25 
  16. ^ NoNameScript by Esnation, http://nnscript.esnation.com 
  17. ^ RFC 1459, 2.2 Character codes

[edit] External links


Personal tools