Internet Technologies/IRC

From Wikibooks, open books for an open world
(Redirected from IRC)
Jump to navigation Jump to search

Internet Relay Chat, commonly abbreviated IRC, is a chat protocol, a way how to enable several people to talk to each other by entering text messages, each participant seeing everything that the other participants write, as if they were in a telephone conference.

Technology of IRC[edit | edit source]

Formally, IRC is a real-time text-based multi-user communication protocol specification and implementation, which relays messages between users on the network. According to Efnet.org, IRC was born sometime in 1988. According to IRChelp.org, the official specification for IRC was written in 1993 in the RFC format. The specification "RFC 1459: Internet Relay Chat Protocol" is a really excellent source for both an introduction to and detailed information about the IRC protocol. Today IRC has a very wide range of users and anyone can find a place to participate in chat.

IRC's largest unit of architecture is the IRC network. There are perhaps hundreds of IRC networks in the world each one running parallel and disjoint from the others. A client logged into one network can communicate only with other clients on the same network, not with clients on other networks. Each network is composed of one or more IRC servers. An IRC client is a program that connects to a given IRC server in order to have the server relay communications to and from other clients on the same network but not necessarily the same server.

Messages on IRC are sent as blocks. That is, other IRC clients will not see one typing and editing as one does so. One creates a message block (often just a sentence) and transmits that block all at once, which is received by the server and based on the addressing, delivers it to the appropriate client or relays it to other servers so that it may be delivered or relayed again, et cetera.

Once connected to a server, addressing of other clients is achieved through IRC nicknames. A nickname is simply a unique string of ASCII characters identifying a particular client. Although implementations vary, restrictions on nicknames usually dictate that they be composed only of characters a-z, A-Z, 0-9, underscore, and dash.

Another form of addressing on IRC, and arguably one of its defining features, is the IRC channel. IRC channels are often compared to CB Radio (Citizen's Band Radio) channels. While with CB one is said to be "listening" to a channel, in IRC one's client is said to be "joined" to the channel. Any communication sent to that channel is then "heard" or seen by the client. On the other hand, other clients on the same network or even on the same server, but not on the same channel will not see any messages sent to that channel.

While IRC is by definition not a P2P protocol, IRC does have some extensions that support text and file transmission directly from client to client without any relay at all. These extensions are known as DCC (Direct Client Connect) and CTCP (Client To Client Protocol). For CTCP, clients like mIRC implement commands such as "ctcp nickname version" or "ctcp nickname ping" to get some interesting infos about other users.

Using Internet Relay Chat[edit | edit source]

To use Internet Relay Chat, you need to do the following:

  1. Choose and install an IRC client.
  2. Find the channel discussing the topic of your interest (similar to a room in other chat environments).
  3. Find the server at which the channel is located. You can be directed to both the server and the channel by the website of a project, such as Wikibooks.
  4. Connect to the server using the client, using a nickname of your choice.
  5. Connect to the channel (a room).


Clipboard

To do:
Provide more information on how to choose nicknames and their use and restrictions of registering them.


Registering your nickname[edit | edit source]

Some IRC networks offer to register your nickname through a service bot. This provides sometimes access to channels that are blocked to unregistered users and in most cases reserves your nickname so no one else can use it (it will at least mark you as the logged in user and anyone else who uses it as not logged in).

The service bots providing this is mostly named "NickServ", sometimes also "AuthServ" or on a big network just "Q". When you found out which one of those bots exists, you can gather more information by typing:

/msg [BOTNAME] help

This should get you detailed instructions on how to use the service.

Example HowTo for a network[edit | edit source]

The process is fairly simple, once you have chosen a nickname you would like to register (assuming it's not owned by anyone else) and chosen a password, follow these steps:

  • If you have not done so already, change your nickname to the one you would like to register
/nick [NICKNAME]

For example:

/nick JohnDoe
  • Send a private message to the network's nickserv service with the password you chose and your email address with
/msg nickserv register [PASSWORD] [EMAIL]

For example:

/msg nickserv register 1234abcd JohnDoe@email.com
  • After messaging the nickserv you should shortly receive a reply back stating that the it received your registration request and sent an email to the address you provided.
An email containing nickname activation instructions has been sent to JohnDoe@email.com
  • To complete the registration process, you will need to message the nickserv with the registration code emailed to your address.
/msg NickServ VERIFY REGISTER JohnDoe p4huc5gqunnc
  • Once you have correctly entered the registration code, the nickserv should message you back stating the nick registration process was completed successfully.
JohnDoe has now been verified.

You should now be "logged in" under your nick. If you disconnect from the server, to relogin under your nick you will need to message the nickserv with your password:

/msg nickserv identify [PASSWORD]

For example:

/msg nickserv identify 1234abcd

Once doing so, it should reply back saying you successfully logged in.

You are now identified for JohnDoe

Private conversations and chats[edit | edit source]

By default, the conversations using IRC are public, visible to all users in the channel.

To have a private conversation with a user in the channel, type "/query nickname".

To have a private chat, join an non-existent channel, and then allow joining only by invitation using the command "/mode +i". Chunked into steps:

  1. /join #mynewchannel
  2. /mode +i
  3. /invite someotherguy

IRC clients[edit | edit source]

To use IRC, you'll need an IRC client--a program that lets you connect to an IRC server, and enter an IRC channel. There is a variety of IRC clients:

Some IRC clients
IRC Client Description OS Restrictions Note
ChatZilla An add-in for Firefox.
IRSSI Has a text-only user interface.
mIRC Windows Good for beginners.
XChat (XChat-WDK for Windows)
Smuxi A user-friendly client for GNOME. Linux and Windows
Colloquy For Mac OS X only.
Pidgin A multi-protocol client. Has more chat protocols than IRC.
Miranda A multi-protocol client.
Trillian A multi-protocol client.
Opera A web browser with integrated IRC client.
BitchX

IRC commands[edit | edit source]

What follows is an overview of some of the basic commands of the IRC protocol. All the commands are already prefixed with a slash "/", as in most clients this will indicate that an IRC command follows that shall be executed. With some IRC clients including ChatZilla and Pidgin, you do not need to know these commands: you tell the client what you want to do using the graphical user interface and the client sends the necessary commands for you.

Basic commands[edit | edit source]

Some basic commands for IRC are listed in the following section. Please note that not all of them are available in all clients, as some of them are client-sided inventions to make your life easier and not part of the IRC protocol itself.

Command What it does Example
/attach

/server

/connect

Sign on to a server /attach irc.freenode.net

/server irc.freenode.net

/connect irc.freenode.net

/nick Set your nickname /nick YourName
/join Join a channel /join #wikibooks
/msg Sends a message (can either be private or to the entire channel) Message the channel: /msg #wikibooks hello world!

Send a private message: /msg JohnDoe Hi john.

/whois Display information about a user on the server /whois JohnDoe
/clear

/clearall

Clears a channel's text.

Clears all open channel's text.

/clear

/clearall

/away Sets an away message. To return from "away", type /away or send a message. /away I'm away because...
/me Sends an action to the channel. See example. The following:

/me loves pie.

would output to the chat in the case of JohnDoe:

JohnDoe loves pie.

/topic Queries or sets the topic of discussion. /topic Using IRC

Privileged User Commands[edit | edit source]

Commands for half-operators, channel operators, channel owners, and admins:

Command What it does Example
/kick Kicks, or boots a user from the channel. You must be a half-operator or greater to do this. Kick a user from the channel with a reason: /kick #channel JohnDoe I kicked you because...
/ban

/unban

Bans a user from the channel. You must be a channel operator or greater to do this.

Unbans a user from the channel. You must be a channel operator or greater to do this.

/ban JohnDoe

/unban JohnDoe