Using soju
soju is a bouncer: it stays connected to your IRC networks for you, keeps their history, and lets several devices share one account. This page is about what Heydrun does with soju. soju's own commands and settings are in soju's manual.
Setting up soju in Heydrun
- On the Networks screen, choose Add network, or edit an existing one.
- Under Connection, fill in soju's Host and Port, and Use TLS if your soju has it.
- Set Server type to soju bouncer.
- Fill in the fields that appear:
- Username: your soju user name.
- Network name (optional): which of your soju networks this profile connects to. Leave it blank for a profile that shows and manages all of them; see Bouncer networks.
- Client ID (optional): a short name for this device, such as
phone. soju then keeps track of what this device has seen apart from your other devices.
- Under SASL authentication, turn on Enable SASL and fill in your soju password. Leave the SASL username blank, and Heydrun uses the soju username.
Heydrun writes the login as soju expects it: user/network@clientid, such as alice/libera@phone. If you use the Server password (PASS) field instead of SASL, enter only the password: Heydrun sends the user name and network in the login's user name, where soju reads them.
IRC server, the default Server type, recognises soju by itself once connected, by the capabilities soju offers, and the network editor then says "Detected: soju", with a button to set Server type to soju bouncer. Choose soju bouncer when you want a network name or a client ID, since those go into the login and must be set before connecting.
Either way, Heydrun doesn't auto-join channels on soju, because soju keeps you in them. If soju says it needs an account, Heydrun reports a failed login rather than reconnecting over and over.
Bouncer networks
Connect a soju profile that has no network name, and its entry on the Networks screen has a Bouncer networks section, with Server type at soju bouncer, or at IRC server once soju is detected. It lists the networks soju is connected to, each with its server, whether it uses TLS, its state (connected, connecting or disconnected) and any error soju reports. The list changes as soju's does.
- Refresh asks soju for the list again.
- Import adds a network as its own profile here, with the same address and login and that network's name. Import all does every network not yet imported. Imported profiles start with auto-connect off, so turn it on for the ones you use. A network renamed on soju is followed by its profile, and the server buffer says so.
- Add network adds a network to soju. Only the Host is needed; the other fields, such as Port, Use TLS, Network name, Nickname, Username, Real name and Server password, use soju's defaults when left blank. Import it as a profile imports it as soon as soju has added it.
- Each network's Actions has Edit, to change it on soju, and Delete, which makes soju disconnect from it and forget it, along with the history it kept. Also delete the imported profile removes its profile here too.
- Actions also sends soju's BouncerServ what the list itself can't change. soju's answer appears in the server buffer, and any password in these is shown there as dots:
- Turn off makes soju disconnect from the network and stay off, keeping its settings and history, and the list then says Turned off; Turn on connects it again. Heydrun learns which networks are off by asking BouncerServ for its network status in the background whenever the list refreshes; those answers aren't shown.
- Away when no app is connected turns soju's auto-away on or off for that network: soju marks you away there while no app is connected, and back when one is. It's on unless turned off, and soju doesn't say which it is.
- Network login (SASL) sets the account name and password soju logs in to the network with, or Remove login stops it. soju keeps them, not Heydrun.
- Connect commands sets the raw IRC lines soju sends each time it connects, one per line, such as
PRIVMSG NickServ :IDENTIFY password. They replace any set before; empty removes them. soju doesn't show which are set. - Create a login certificate has soju make a certificate for SASL EXTERNAL on that network and show its fingerprint, to add to your account there, such as with
/msg NickServ CERT ADDand the fingerprint.
If you run soju, soju server (admins), beside Add network, has its server tools: Server status and Users show soju's own summary in the server buffer; Add a user (with a password, and optionally as an admin), Turn a user off or on, which keeps their settings and history while they can't log in, Delete a user, which soju can't undo, and Notice to everyone, sent to every app connected to soju. Heydrun sends the confirmation soju asks for when deleting, once you've confirmed here. For someone who isn't an admin, soju answers with an error.
In a soju channel, soju channel options, in More actions, sets what soju does with it while it's detached: which messages still show (while detached, show), what brings it back (rejoin it on), what keeps it from detaching (quiet time restarts on), and how long it's quiet before soju detaches it, such as 30m or 1h30m, or 0 for never. Each can be soju's default, any message, a mention of you, or nothing. soju doesn't say what's set, so each starts at Leave as it is, and only what you change is sent.
For the rest of what BouncerServ does, /bouncerserv help lists its commands; they're described in soju's manual.
soju's answer, such as Added "libera" to the bouncer, or why it refused, is shown on the Networks screen.
History
soju keeps each channel's and private message's history, and Heydrun fetches it as you need it:
- When you join, or reconnect, Heydrun fetches recent messages, up to the History fetch limit in Settings, IRCv3 history.
- Load older messages, at the top of a buffer, fetches earlier ones. Scrolling to the top does the same.
- Search logs, in More actions, searches soju's history as well as the logs on your phone, for the buffers the search covers. Results from soju are marked Bouncer, a result already in your logs is shown once, and opening one fetches the messages around it if they aren't in the scrollback.
What's kept in step with your other devices
Some things are kept on soju, so your other soju clients see the same:
- Where you've read up to. When you leave a buffer, or reach its newest message, Heydrun tells soju. When you read a buffer on another device, its unread count here goes to zero and its notification is removed. The first-unread line stays in the right place across reconnects.
- Mutes. Muting a channel or private message until you turn it back on mutes it for your other soju clients too, and the other way round. A change made on one side while the other was away is kept when they next connect. A mute for a while, such as 8 hours, stays on this phone.
- Pins. A channel or private message pinned to the top of its network here is pinned in your other soju clients, such as goguma, and the other way round, the same way.
Share mutes with soju and Share pins with soju, in the network's settings, turn either off; it then stays on this phone. They're shown with Server type at soju bouncer, or at IRC server once soju is detected, and a change takes effect when you save.
- What you send. Messages you send from another device appear here too.
- Channels. soju keeps you in your channels, so joining or leaving one here does the same everywhere.
The rest is kept on this phone only: Heydrun's settings, each buffer's other settings, such as reading aloud and highlight words, your ignore list, notify list, aliases, scripts, encryption keys and chat logs.
Detaching from a channel
/detach, or Detach from channel in More actions, leaves a channel here while soju stays in it and keeps its history. With a screen reader, a channel in the buffer list has a Detach action too. /join brings it back. Heydrun offers this once soju is detected or chosen as the Server type.
Push notifications
soju can tell your phone about mentions and private messages while Heydrun isn't connected, through a push app that works with UnifiedPush, such as ntfy.
- Install a push app, such as ntfy.
- Turn on Push notifications in Settings, IRC, and choose your push app if you have more than one.
- Connect to soju. Heydrun gives soju this phone's push address each time it connects.
soju encrypts each push, so your push app's server can't read it. Heydrun shows it as a notification and doesn't add it to the buffer: the message itself arrives when Heydrun next connects. An encrypted message, such as +AGE, shows as "Encrypted message". Pushes follow Heydrun's Do not disturb. Turning Push notifications off tells every server you're connected to to stop.
Logging in with this phone's certificate
Instead of a password, soju can log you in by the TLS client certificate Heydrun connects with (SASL EXTERNAL). soju's administrator has to allow this.
- Give the network a certificate: under TLS client certificate, in the network's settings, Heydrun can make one just for this network.
- Connect and log in with your password as usual.
- In the network's Connection settings, choose Use this phone's certificate for soju. It's shown once you're logged in, on a soju that offers it. Heydrun asks soju to remember the certificate, named after Heydrun and your phone's model, never the name you gave the phone.
- When soju confirms, in the server buffer, set the network's SASL mechanism to EXTERNAL.
Uploading files
soju can offer file uploads. Where it does, the message field has an Upload file button: the file goes to soju, and its link goes into your message, so you can add to it before sending.
Commands
/bouncerserv <command>, or /bnc, sends a command to soju's BouncerServ, with suggestions as you type. What those commands do is soju's: see soju's manual. Most of what they do, such as adding networks, Heydrun's Bouncer networks section does too.