This is an old revision of the document!


Quoting the official weechat documentation: “The Relay plugin can act as an IRC proxy: it will simulate an IRC server, and you can connect to WeeChat with any other IRC client (including WeeChat itself). You can define one port by IRC server, or one generic port for all servers.”

Configuring weechat's relay plugin turns out to be really simple and straightforward. The great advantage over irssi's proxy plugin for sdf/sdf-eu users is that in weechat you only need one port for all your servers whereas in irssi you need a different port for each server. This means that you need as many open ports on the host as irc servers you connect to.

sdf/sdf-eu users have one available port which is their id number. To find out your port type id at the terminal. You will see something similar to this:

odin:~$ id

uid=007(bond) gid=500(arpa) groups=500(arpa),600(MetaARPA),700(dba),900(motd)

Only the uid part is relevant here, uid=007(bond) which means that 007 is the 'port' and bond is the 'username'. Let's now assume that user bond wants to use the password james_bond (This way, you will understand the examples better).

To begin with, start weechat-curses, connect to your networks/servers and join your favourite channels.

1.- Inside weechat:

* First check that you have the relay plugin installed typing:

/plugin

The relay plugin should be loaded by default. If it is not, for any reason, you can load it with:

/plugin load relay

Then, start the configuration as follows:

* Add the irc proxy, for all servers

/relay add irc port  #Remember that your port is your id number

Example: /relay add irc 007

* Set the password

/set relay.network.password "password"

Example: /set relay.network.password “james_bond”

2.- Now on the client side:

Configure your client to connect to sdf.org or sdfeu.org through your port.

Example: sdfeu.org/007

One important consideration here is to remember that since you are going to use the same port for all your servers, you have to make sure that your client sends the password in the form server:password. You can use the PASS command for that (PASS server:password).

Examples of adding the servers and connecting to them providing the password (the syntax may be different depending on the client you are using).

/server add freenode sdfeu.org/007 -password=freenode:james_bond

and then:

/connect freenode

You have to repeat the process for each server:

/server add oftc sdfeu.org/007 -password=oftc:james_bond

and then:

/connect oftc

Keep going until you have added all your servers:

/server add sdf sdfeu.org/007 -password=sdf:james_bond

and then:

/connect sdf

You will see how your client automatically connects to the servers you have just added and how your favourite channels appear in the client. As a bonus point, weechat will send the backlog to your client.