πΎ Archived View for m0yng.uk βΊ 2021 βΊ 09 βΊ Talking-IRC-via-XMPP captured on 2023-01-29 at 02:50:05. Gemini links have been rewritten to link to archived content
β¬ οΈ Previous capture (2022-07-16)
β‘οΈ Next capture (2023-05-24)
-=-=-=-=-=-=-
Created 2021-09-05
mastodon.radio has an XMPP server, which is mostly there because I wanted to see if I could. WIth some help from Mike it even authenticates using the user's mastodon account (mastodon xmpp config file[1]) but none of that is relevant to this!
1: https://git.chinwag.org/chinwag/mastodon-xmpp-setup/src/branch/default/www/index.html
Matrix is interesting in that it bridges to lots of other networks. So we have a #hamradio-za IRC channel at Libera.Chat, but it can be fully and easily accessed from Matrix by just joining the room from there. IRC Libera.Chat does already have a global #hamradio channel going too.
And I wondered if we could do XMPP to IRC and things looked hopeful because mod_irc[2] exists. But I couldn't find any documentation on it, and Π₯Π°ΡΠΏΠ΅Ρ in the XMPP Service Operators MUC said it was depreciated and the modern option was biboumi[3].
2: https://www.ejabberd.im/mod_irc/index.html
I patched together some bits from the biboumi documentation[4] and this post by copyninja[5] to get it working, and here follows an idiot's guide to remind me what to do next time (if there is one.)
4: https://doc.biboumi.louiz.org/9.0/admin.html
5: https://copyninja.info/blog/xmpp-irc-gateway.html
There isn't really any obvious advantage to doing this rather than just directly connecting via IRC, but some benefits to me are:
We need to tell ejabberd about our "external component", which we add to the `listen` section
listen: - port: 5347 ip: "127.0.0.1" module: ejabberd_service access: all hosts: "biboumi.mastodon.radio" password: yourpasswordgoeshere
This password is for biboumi to talk to ejabberd and is needed in the biboumi configuration file.
You can restart ejabberd now and hopefully it will start up happy.
I already have postgres as mastodon uses it, so it was easy to just add a new user and database for this.
First get a root prompt on postgres:
sudo -u postgres psql
Then create our user, give it a password, and create a database:
CREATE USER biboumi CREATEDB; ALTER USER biboumi WITH PASSWORD 'yourDBpasswordHere'; CREATE DATABASE biboumi OWNER biboumi; \q
Mine is very mich like the example...
hostname=biboumi.mastodon.radio password=yourpasswordgoeshere xmpp_server_ip=127.0.0.1 port=5347 admin=m0yng@mastodon.radio db_name=postgresql://biboumi:yourDBpasswordHere@localhost/biboumi realname_customization=true realname_from_jid=false
At this point I would run biboumi manually to see if it works and look for any issues and errors (I had a few and this is the final working version.)
sudo biboumi /etc/biboumi/biboumi.cfg
Assuming everything is ok, we can enable and start the service
sudo systemctl enable biboumi.service sudo systemctl start biboumi.service
From the XMPP side of things we are joining a Multi User Channel (MUC) but the format is slightly verbose, for example to join the `hamradio` channel use this magic string:
#hamradio%irc.libera.chat@biboumi.mastodon.radio #hamradio <- is the channel name %irc.libera.chat <- is the IRC server @biboumi.mastodon.radio <- is the local transport we set in the configuration
From there everything just sort of worked for me, I'm even able to send and receive messages on my laptop (using dino) and mobile phone (using blabber.im) and a terminal (using profanity.)
In order to speak in the #hamradio room on libera.chat you need to have registered your nickname. Which is fairly easy.
You can't do the usual `/msg NickServ` so you need to start a chat with NickServ directly. Their "address" is basically the same as we used to join the channel:
nickserv%irc.libera.chat@biboumi.mastodon.radio (note the lack of a #, 'cos it's not a channel.)
Then you can just message them directly with the usual commands
REGISTER <password> <email>
which will hopefully send you an email with instructions to confirm the registration. Then you need to identify the next time you connect - directly messaging NickServ like you did to register.
IDENTIFY <nick> <password>
If you have any questions, and think I might be able to help, feel free to ping my via XMPP m0yng@mastodon.radio[6] or mastodon[7]
7: https://mastodon.radio/@M0YNG
-+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+-
π€ Black Lives Matter
ππ€π Trans Rights are Human Rights
β€οΈπ§‘ππππ Love is Love
Copyright Β© 2022 Christopher M0YNG
Code snippets are licenced under the Hippocratic License 3.0 (or later.)
Page generated 2022-12-11 by Complex 19