Hack This: Start an IRC Channel
Internet relay chat (IRC) is a fundamentally primitive technology, a precursor to social networks, and, especially, chat services like Slack and Hipchat. Slack, in particular, has been quietly decimating IRC as mass chats and chat-supported collaborations make the jump from the relative anarchy of IRC to what is perhaps a new group-chat standard (and is based on a fancy newish network protocol called WebSockets). A quick poll of open-source projects (the first 10 or so that came to mind) finds that Slack is just about ubiquitous where public chats are in use by contributors.
The heart of an IRC channel is a server. On this server exists a daemon, which is basically a background computer program that waits around for something in particular to happen. Here, the daemon waits for incoming network connections on certain designated ports. For every incoming IRC connection, the IRC server maintains a TCP connection with some client, who can read messages that live on the server and also add messages. There are also commands that can be entered by clients for things like requesting channel invites or finding users by name.
IRC networks expand by adding additional servers, and, with them, clients. Every server in an IRC network shares the same global state. So, a client can post a message to one server, and that server will make sure it’s mirrored to the other servers. Freenode, the largest IRC network, employs a couple dozen servers, which then serve some 90,000 to 100,000 averages users across 35,000 to 45,000 channels.
Here’s the basic architecture:
IRC is an application layer protocol. This layer is the top of the network technology stack and it’s where regular end-users interface with networks. Other protocols at this level include HTTP (where webpage-formatted content is transferred), SMPT (email), FTP (file transfer), SSH (remote command shells), and DNS (domain name resolution). These are all just message formats corresponding to different network-application functions. The format for IRC, which was first formalized by the IEFT in 1993 after several years of increasing popularity, is lightweight: message target (“to:”), IRC channel, IRC server, and then the message itself. IRC is basically text messaging over the internet, but usually featuring multiple recipients.
The maximum size of an IRC message is 512 characters. This has to include not just the message to be displayed to other users, but the meta information as well, including the nick (client nickname) along with any commands and command parameters. The actual message payload, the thing to be communicated to other users (read: content), is prefaced by a command (PRIVMSG) and is transported in the form of a parameter to that command. (Note that many of the IETF specs for IRC are routinely violated by various IRC networks; protocols are really just things that clients and servers agree upon.)
0.0) THE FIRST CHAT
At its 1988 inception, IRC was intended to be an extension of a BBS (bulletin board system) at the University of Finland called OuluBox. Its creator, Jarkko Oikarinen (the “WiZ”), basically wanted a real-time BBS, featuring a real-time Usenet-style discussion board service. The chat feature of Oikarinen’s future-BBS was the first thing to be implemented, which is a good thing because he would soon have to nuke the whole real-time BBS idea. It was too unrealistic.
Still, IRC was in place and so BBS users could at least chat in real-time. At first, this was only among universities in Finland, but soon enough servers at the University of Denver and Oregon State University were connected as well. By the end of 1988, IRC had spread across the internet at-large and encompassed 40 servers, according to an IRC history by cURL creator and IETF member Daniel Stenberg.
Over the next several years, IRC would split several times, resulting in not just a single IRC but several, including Anarchy net, EFnet, IRCnet, Dalnet, and others. In 1998, Freenode launched as the Open Projects Net. It was to be the IRC network supporting the open-source movement and it remains as such.
1.0) PICK A CLIENT
A chat client is how a user and-or administrator interacts with IRC. There are a whole lot of them. I picked CIRC, which is a Chrome app. LimeChat (Mac) and HexChat(Windows) both come recommended as free standalone clients.
1.1) PICK A NICK
Open up your client and set your nickname (“nick”) like this:
/nick is the command, followed by whatever your nickname is going to be.
2.0) PICK A NETWORK
Freenode is generally supposed to be for “on-topic” chatting—that is, chatting about open-source projects. There’s a whole lot of flexibility in there, but for now let’s set up our channel at IRCnet, which is about as OG as IRC gets. In our chat client, all we need to do is issue the /server command along with the hostname of the server.
The hostname is one of several US IRCnet servers in the United States. It’s the first one I found when Googling. If your nick is already taken on the server, it will be automatically tweaked. When I tried to connect with “mike,” the server changed it to “_mike”. I changed my nick to “byrneio” and found no conflict.
3.0) MAKE YOUR CHANNEL
Now for the big anticlimax. Let’s make a channel. We do this with the /join command, like so:
My channel is #byrneio.
That’s it. Really.
3.1) GUARD YOUR CHANNEL
Part of what makes the IRCnet network interesting is that it doesn’t support registration. Nicks and channels are first-come first-served.
How does one actually administer a channel then? IRCnet offers this guidance:
The short answer – with experience, resources, and patience. In other words, the old fashioned way. As a channel op, it is your job to run your channel. Generally I advise that you do not try to run a channel unless you already have at least 5 and preferably 10 trusted friends with 24/7 connections to give you a “critical mass”. Then you guys can pass ops back and forth and not lose ops.
So, you basically need to keep your channel active so that no one can drop in and grab it. It’s possible to script IRC commands, so that would certainly help, though it’s a bit beyond the scope of this tutorial.
4.0) THE VOID
If your new channel is feeling a bit lonely (as #byrneio is), type in the command /list. This will list every active IRCnet channel on the current server. Go out and make some new friends.