IRC is propagated by the i2p developers in a way, as it readibly useable after your router is up, integrated and running. What this means is, that there is a tunnel configured to connect to the irc2p irc-network and you only need to configure a client to connect to the local port of that tunnel.

But what is this inter relay chat (irc)? Its a decentralised network for exchanging messages. People have been using irc on ClearNet for a long time. Now there are servers on the I2P net too. These form an irc-network called irc2p. That’s what we are going to deal with here.

I did set this up yesterday for myself. So I’ll package this up into a howto right away so I can use it as my irssi-cheat-sheet, also ;) I will use irssi, a command-line irc client here. Should work in a similar way with any other client though.

Installation and Basic Configuration

Irssi is packaged in Debian, so all you got to do to install is apt-get install irssi.

Now before you use it, let’s do some relevant configuration first. However, to generate the relevant configuration in your home directory, you will need to fire it up once. It shouldn’t connect anywhere unless you tell it to. So start like this:

 Irssi v0.8.17 - http://www.irssi.org                                                            
18:10 -!-  ___           _
18:10 -!- |_ _|_ _ _____(_)
18:10 -!-  | || '_(_-<_-< |
18:10 -!- |___|_| /__/__/_|
18:10 -!- Irssi v0.8.17 - http://www.irssi.org
18:10 -!- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
18:10 -!- Hi there! If this is your first time using Irssi, you
18:10 -!- might want to go to our website and read the startup
18:10 -!- documentation to get you going.
18:10 -!- 
18:10 -!- Our community and staff are available to assist you or
18:10 -!- to answer any questions you may have.
18:10 -!- 
18:10 -!- Use the /HELP command to get detailed information about
18:10 -!- the available commands.
18:10 -!- 
18:10 -!- For Debian specific help type "/connect irc.debian.org"
18:10 -!- and "/join #debian" (without the quotes) and ask your
18:10 -!- question.
18:10 -!- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

At the bottom you will have a prompt to enter commands. Type quit to exit the application. You’ll be back on your shell prompt.

Irssi comes with configurations for several ClearNet irc networks. Assuming an i2p-only usage here, let’s get rid of those and define the irc2p network instead. That’s all in one config file, so open it in your editor and change the content of servers, chatnets, and settings to something like this (put your desired names in the settings section):

user@host$ vim .irssi/config
servers = (
  {
    address = "127.0.0.1";
    chatnet = "irc2p";
    port = "6668";
  }
);

chatnets = {
  irc2p = {
    type = "IRC";
    max_kicks = "4";
    max_msgs = "20";
    max_whois = "30";
  };
};
[...]
settings = {
  core = {
    real_name = "Little Big T";
    user_name = "littlebigt";
    nick = "lbt";
  };
  "fe-text" = { actlist_sort = "refnum"; };
};

Important is the servers section which now defines only one server, your own machine. It points to the port 6668 which is preconfigured in the router to be forwarded via i2p to the i2p-destination used by the irc-server on i2p. The other important part is the name you want to use, which you put in the settings section.

Connecting and First Steps

To connect you just fire up irrsi again. This time don’t just exit, but issue a /connect irc2p. That will make irssi connect to the server as you have configured it above. You will get a greeting message, which you should read.

IRC and Anonymity

Irc can do many things besides the chat-message. Some of those might help to reveal your identity, therefore you should consider dealing with them. One thing is to ignore direct client-to-client (DCC) commands, like this:

/ignore * CTCPS
/ignore * DCC

Irssi will also make your hostname available, which you might want to set manually like this:

/set hostname findme.i2p

There’s a page on this on the new wiki, might be work checking that out from time to time.

IRSSI (and its Windows)

First thing to know then is that irssi uses virtual windows. Yeah, as a command-line application. If you are not used to this, it might not be obvious. At this point you probably only have one window open, which should be indicated by something like [1:irc2p (change with ^X)] in the status line quite at the bottom. If you open other windows, which will automatically happen with commands like contacting somebody or entering a channel, you should be prepared to switch between them with Alt + left/right. The status line will always tell you what the currently active window is.

Now if one can open windows, it’s good to be able to close those too, right? Otherwise their number will just grow and it will be hard to have any overview. To close the window you are in just use /window close. You can also use the abbreviation /wc.

While these are the most essential commands of irssi, there are many more. You can get a list by issueing /help and read more details on specific commands with /help commandname. This works for all commands starting with a slash, so you might want to keep this in mind for the following sections.

IRC and Identity

Identifiers on irc can be reserved for your usage, which requires registering witht the server to claim it. In the welcome message I was told

[...]
12:06 -!- - The Irc2P network offers services to register/manage nicknames and channels.
12:06 -!- -
12:06 -!- - /msg nickserv help commands : to get help about nickname management
12:06 -!- - /msg chanserv help commands : to get help about channel management
[...]

The command /msg sends a message - here, to a user. Now nickserv and chanserv aren’t real users, they are programs. Bots, as such programs are often called. In this case (hopefully) good bots, which allow you to command them by whispering them. So I next registered my nick as this:

/msg NickServ REGISTER mypasswordhere lbt@mail.i2p
12:22 -!- Mode change [+r] for user lbt

At this point a new irssi window will open and the status line will now show something like [2:irc2p/nickserv] to indicate you are in a chat with nickserv. Note that I supplied an email-address here and not the username I am actually using. Also note that you will have tell nickserv who you are each time you log in like this:

/msg NickServ IDENTIFY yourpasswordhere
12:19 -!- Mode change [+r] for user lbt

It’s again a “conversation” with the bot NickServ. If you do not have it already you will get a window for that conversion as above.

IRC Messaging and Bots

The registration and identification as described above are probably the most typical examples of interacting with a bot. It can do more though. You can get more details on the commands with /msg NickServ help as advertised.

Note that this is a whisper to the NickServ bot again and that it will answer with a whisper. That will be shown in the nickserv window, only. So while the command works fine from any window, the reply will only be in that one window. As a sidenote, if you are in that window already, you can also just issue help instead of /msg NickServ help. But if you do that in a different window, then you will say “help” to the recipients there. So be aware of this difference and know what window you are typing to.

There are other bots. On irc2p you will immediately encounter NickServ, ChanServ and InfoServ. You can try whispering them and using there help. But watch your windows as outlined above. Bots can be any kind of program though, for example I know of file-sharing bots, bots that try to communicate as if it were a human, citing bots reacting to certain words or phrases and automatically providing according links, and more.

IRC Channels

Besides the chatting, irc mainly is about channels. Those are basically chat-rooms in which several users gather. To check available channels, you can use the command /list. Irssi will probably just warn you, that this isn’t a good idea. At this point many new users might go “wtf?”. But on ClearNet irc networks are really huge. So the command “show me all channels” is something like near a denial-of-service attack. Currently you can do that on the irc2p network, so go again with /list -yes to have the command being executed. In the status window you will get a list of channels with their description. An example is:

20:23 -!- #honey 2 [+nt] This is the "secret" Channel where PoohBear 
          stores honey jars. Please ask PoohBear before taking a honey jar

So on this occassion take note that channels might have different kind of rules. And before you ask, yes, there are various ways for according people to enforce their rules. So consider what you are doing before being on everybodys ignore list ;)

Ok, you found some channel interesting and want to enter it. This is done with the /join #channelname command. There are support-channels for irc2p and i2p, each. Named accordingly. Joining these with /join #irc2p and/or /join #i2p respectively might be a good idea if you have questions on these networks. If you just want to chitchat in a public room, you can try /join #i2p-chat.

Ignoring “Things”

One thing I stumpled upon pretty fast is the problem of messages generated by the irc system. I got flooded with message about joining and leaving and missed what interested me, i.e. what users said. You can easily ignore these message with the /ignore command. It can be customised, but to mute the most often appearing messages for a specific channel I for example did:

/ignore -channels #i2p JOINS PARTS QUITS

so that joining and leaving the channel as well as quitting of users will not produce any more messages. If you want to do that for all channels and user-chats you could do a:

/ignore * JOINS PARTS QUITS NICKS

but note that this ignoring also means that you miss information. If you are talking to someone it might be an important information that they have lost network connections and quit irc, right?

Further Customisation and Stuff

You can do a lot to further customise irssi. One prominent example might be to change the time-stamp format to a more precise one, like this:

/set timestamp_format %H:%M:%S

Things you change can be easily saved using a simple /save, which will update the used ~/.irssi/config. If you care have a look inside there to see. Note that identification for the nickname from above does not get saved this way. You might want to use different identities or something. If you want to change it, you can include the according line with the /msg nickserv command from above into a variable autosendcmd of your chatnets-definition in that file. That way, you would get automatically identified each time a connection is established. While you are add it, you might want to add channels, that you would like to join automatically. See my example here for how it could look like:

servers = (
  { address = "127.0.0.1"; chatnet = "irc2p"; port = "6668"; }
);

chatnets = {
  irc2p = {
    type = "IRC";
    max_kicks = "4";
    max_msgs = "20";
    max_whois = "30";
    autosendcmd = "/msg NickServ identify yourpasswordhere";
  };
};

channels = (
        { name = "#irc2p"; chatnet = "irc2p"; autojoin = "yes"; },
        { name = "#i2p"; chatnet = "irc2p"; autojoin = "yes"; },
        { name = "#i2p-chat"; chatnet = "irc2p"; autojoin = "yes"; }
);

Oh, I haven’t mentioned that yet. But it’s nice to let irssi run inside a screen session to be able to see what was going on while you weren’t there. I don’t have a howto on screen as of now. Will try do that, until then you will have to find out otherwise about that …


ClearNet Links:

  • http://www.irssi.org/