Skip to content

Instantly share code, notes, and snippets.

@kplattret
Last active March 14, 2020 11:49
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kplattret/91536a1a8f287644a9c5792f5285b180 to your computer and use it in GitHub Desktop.
Save kplattret/91536a1a8f287644a9c5792f5285b180 to your computer and use it in GitHub Desktop.

Quick-start guide to using IRC on WeeChat

First you need to install WeeChat, which is a CLI client for IRC:

$ brew install weechat

Then you can launch WeeChat just like this:

$ weechat

All further commands should be run within WeeChat.

Register your nickname on Freenode

Freenode is the most popular public IRC server nowadays and it's the one we're going to use. Follow these steps to register your nickname, which will allow you to keep it across all your sessions, prevent others to use it and unlock some actions that can only be performed by registered users on the server, such as join restricted-access channels or send private messages to other users.

  1. Add the Freenode server: /server add freenode chat.freenode.net;
  2. Connect to Freenode: /connect freenode;
  3. Choose a permanent nick that you like: /nick yournick;
  4. Register your nick: /msg NickServ REGISTER yourpassword youremail@example.com;
  5. Run the verification command received by email;
  6. Identify with your nick: /msg NickServ IDENTIFY yournick yourpassword.

More details at https://freenode.net/kb/answer/registration

Configure WeeChat

Adjusting the following settings in your WeeChat setup will improve your experience considerably as it means that you will only have to do it once. After that it will just work.

Recommended settings:

  1. Set the server's SSL address: /set irc.server.freenode.addresses "chat.freenode.net/7000";
  2. Set your nick: /set irc.server.freenode.nicks "yournick";
  3. Enable SSL mode on server: /set irc.server.freenode.ssl on;
  4. Set your SASL username: /set irc.server.freenode.sasl_username "yournick";
  5. Set your SASL password: /set irc.server.freenode.sasl_password "yourpassword";
  6. Enable server auto-connect: /set irc.server.freenode.autoconnect on.

Optional settings:

  • Set your username: /set irc.server.freenode.username "Your username";
  • Set your real name: /set irc.server.freenode.realname "Your real name";
  • Add auto-join channel(s): /set irc.server.freenode.autojoin "#channel1,#channel2,#etc".

More details at https://weechat.org/files/doc/stable/weechat_quickstart.en.html

Useful IRC commands

  • Join a channel: /join #channel;
  • Send a private message: /query theirnick this is a message;
  • Leave a channel or private chat: /close;
  • Jump to a channel: esc + 1, esc + 2, etc;
  • Rotate through channels: alt + up and alt + down;
  • Scroll within channel: fn + up and fn + down;
  • Hide IRC join/part/quit messages: /filter add joinquit * irc_join,irc_part,irc_quit,irc_nick_back *;
  • Don't log IRC join/part/quit messages: /set logger.level.irc 3.

Optional: buddylist

The buddylist script is useful to know when your friends are online.

  • Install the script: /script install buddylist.pl
  • Add a friend: /buddylist add theirnick
  • Remove a friend: /buddylist del theirnick
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment