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.
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.
- Add the Freenode server:
/server add freenode chat.freenode.net
; - Connect to Freenode:
/connect freenode
; - Choose a permanent nick that you like:
/nick yournick
; - Register your nick:
/msg NickServ REGISTER yourpassword youremail@example.com
; - Run the verification command received by email;
- Identify with your nick:
/msg NickServ IDENTIFY yournick yourpassword
.
More details at https://freenode.net/kb/answer/registration
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:
- Set the server's SSL address:
/set irc.server.freenode.addresses "chat.freenode.net/7000"
; - Set your nick:
/set irc.server.freenode.nicks "yournick"
; - Enable SSL mode on server:
/set irc.server.freenode.ssl on
; - Set your SASL username:
/set irc.server.freenode.sasl_username "yournick"
; - Set your SASL password:
/set irc.server.freenode.sasl_password "yourpassword"
; - 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
- 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
andalt + down
; - Scroll within channel:
fn + up
andfn + 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
.
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