Using irc.libera on WeeChat
2021-09-16 | aprates.dev[1] Leia este post em português
Internet Relay Chat (IRC) is a text-based chat system. It enables discussions among any number of participants in so-called conversation channels, as well as discussions between only two partners. - Wikipedia
Flashback
┏┳┓╻┏━┓┏━╸ ╻┏━╸┏━┓ ┏┳┓┏━┓┏┓╻ ┃┃┃┃┣┳┛┃ ┃┃ ┃┓┃ ┃┃┃┗━┓┃┗┫ ╹ ╹╹╹┗╸┗━╸ ╹┗━╸┗┻┛ ╹ ╹┗━┛╹ ╹I remember using IRC in my teenage years… Mixed memories of mirc, icq, msn and long lasting chats, while writing some html on win95 using ms notepad :P
Fast-forward to 2021
As fresh services likelibera
[2] stepped in, and new channels about 'libre' open-source projects started blooming here and there, I felt like getting around and joining the new wave. Fear of missing out? Nah, more like developer tribe thing. I decided to do that while also trying to live a bit more on the command line…
…but not so fast!
Opting for terminal basedWeeChat
[3] as IRC client, I found out it needs quite some arcane configuration steps, which after a few back and forth, and some mistakes, I decided to rm -r ~/.config/weechat
and start over. While doing it carefully for the second time. I've took note of the right steps this time and wrote them in this tutorial, hoping that it might be useful to someone (even if it's the future me when I forget how to do it again).
So, How To Do It?
For LinuxWeeChat
should be available via your favorite package manager on pretty much all main distros. For macOS you can install it via Homebrew
[4] and… Windows? Maybe over WSL
- not sure, haven't tried.
Warning, geeks joke:
As a lazy Manjaro Linux user I installed WeeChat
via Pamac GUI… Err, sorry about that. Maybe next time I will do it "By The Way", and use pacman -S
on the command line, but won't lie, wasn't this time. Can't say "Arch By The Way" and not think about The Mandalorian saying "That Is The Way" haha! Sorry, again. xD
Step-By-Step Setup
Do this in the order, as I describe, that is the trick: the right order.- First of all, from the command line, start the app:
weechat
- Add
libera
server (with SSL):
/server add libera irc.libera.chat/6697 -ssl
- Set your username (better before you connect):
/set irc.server.libera.nicks <username> /set irc.server.libera.username <username>
Note:
the nick is not necessarily same as username, and you could have many nicks. For simplification, I suggest to use just one nick, and make it equal to your username. This will make your life easier. I won't dive into explaining about multiple nicks, there are plenty of explanations elsewhere, and in my humble opinion, this is mostly a source of confusion to this process, regarding registering your user.
- Connect and enable auto-connect:
/connect libera /set irc.server.libera.autoconnect on
- Register your nick with
libera
[5] (skip if you have already registered):
/msg NickServ REGISTER <password> <email>For the password, enter a new password for your user. Then you will get an e-mail with a command you need to enter to confirm your registration. It will look like this:
/msg NickServ VERIFY REGISTER <username> <token>
- Finally, configure SASL (same password you used on registration):
/set irc.server.libera.sasl_mechanism PLAIN /set irc.server.libera.sasl_username <username> /set irc.server.libera.sasl_password <password>
- Ensure all your configs are saved with:
/saveet voilà!
Usage Tips
If it's the case you haven't used IRC before, or like me, forgot most of it. Don't feel lost, here goes a quick recap…- Join a channel:
/join #channel
- Send a private message to someone (only you both will see this message):
/msg user message
- Start a private chat with someone (like a separate channel):
/query user message
- Start a private chat with two or more users (use comas, but no spaces):
/query user1,user2,user3 message
- Ask a users if they want to join you on a channel:
/invite user #channel
- Close a thread:
/close
Extra Tips
- Scroll the chats with your mouse wheel:
/set weechat.look.mouse on
- Auto-join your favorite channels when
WeeChat
starts:
/set irc.server.libera.autojoin "#channel1,#channel2"
- Filter IRC join/quit messages (unless you find them useful):
/set irc.look.smart_filter on /filter add irc_smart * irc_smart_filter *That's it, a bit of a faff, but at last, all set!
Now you can enjoy chatting directly from a terminal :D
References
[2] libera[3] WeeChat
[4] Homebrew
[5] Nick Registration
See also
[6] Capsule Archives[7] Capsule Home
Want more?
Comment on one of my posts, talk to me, say:hello@aprates.dev
[8] Subscribe to the Capsule's Feed
[9] Checkout the FatScript project on GitLab
[10] Checkout my projects on GitHub
[11] Checkout my projects on SourceHut
Join Geminispace
Gemini is a new Internet protocol introduced in 2019, as an alternative to http(s) or gopher, for lightweight text contents and better privacy.Not sure how, but want to be part of the club? See:
[12] Gemini quick start guide
Already have a Gemini client?
[13] Navigate this capsule via Gemini
© aprates.dev, 2021-2024 - content on this site is licensed under
[14] Creative Commons BY-NC-SA 4.0 License
[15] Proudly built with GemPress
[16] Privacy Policy