Internet Relay Chat (IRC) is an application layer protocol used for real-time online chat.
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. Most IRC servers do not require users to log in, but a user will have to set a nickname before being connected.
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.
Commands and repliesEdit
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 slash (
/). 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.
The basic means of communication in an established IRC session is a channel. Multiple channels may be hosted by a single server.
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.
Arguments are in angle brackets. In an argument, the default value or command is the value after the colon. Arguments in square brackets are optional. These commands are defined in RFC 1459 and RFC 2812. The intended user is in a clause preceding the description.
| ||Returns information about the administrator of the server.||RFC 1459|
| || Provides a message to automatically send in a reply to a ||RFC 1459|
| ||See connect (RFC 2812).||RFC 1459|
| ||For IRC operators; instructs the remote server to connect to the target server on port port. The port argument became mandatory in RFC 2812. See also connect (RFC 1459).||RFC 2812|
| ||Shuts down the server.||RFC 2812|
| ||For servers; reports errors to other services||RFC 2812|
| ||Returns information about the server.||RFC 1459|
| ||Invites client nickname to the channel channel.||RFC 1459|
| ||Returns which of the clients nicknames are on the network, in a space-separated list.|
| ||Instructs the client to join the channels, specifying the passwords, if needed. If the channels do not exist then they will be created.||RFC 1459|
| ||For channel operators; forcibly removes nickname from the channel channel.||RFC 1459|
| ||For IRC operators; forcibly removes nickname from the network.||RFC 1459|
| ||Lists all server links matching server mask on the remote server.||RFC 1459|
| ||Lists all channels on the server. If channels are given, the command returns those channels' topics.||RFC 1459|
| ||Returns statistics about the size of the network. If mask is given, it only returns statistics reflecting the masked subset of the network.||RFC 2812|
| ||Used to set a client's mode.||RFC 1459|
| ||Used to set a channel's mode.||RFC 1459|
| ||Returns the "message of the day" on server.||RFC 2812|
| ||See names (RFC 2812).||RFC 1459|
| ||Returns a list of who are on the channels. If a channel is not specified, all users are shown, grouped by channel name. Users not in a channel are shown as part of channel "*".||RFC 1459|
| ||See nick (RFC 2812). Hopcount is for use between servers to specify how far away a nickname is from its home server.||RFC 1459|
| ||Change the client's IRC nickname.||RFC 2812|
| ||Sends a private message to target (user or channel), disabling any automatic replies.||RFC 1459|
| ||Authenticates a user as an IRC operator on the network or server.||RFC 1459|
| ||Instructs the client to leave the channels.||RFC 1459|
| ||Sets a connection password.||RFC 1459|
| ||Tests the presence of a connection.||RFC 1459|
| || This command is a reply to a ||RFC 1459|
| ||Sends a private message to target (user or channel).||RFC 1459|
| ||Disconnects the user from the server.||RFC 1459|
| ||For IRC operators; instructs the server to re-read and re-process its configuration files.||RFC 1459|
| ||For IRC operators; restarts a server.||RFC 1459|