doc: use openssl -verify_quiet instead of discarding stderr
stderr prints useful information when openssl fails to connect to
the server. Use -verify_quiet to reduce chatter a bit and still
retain error messages.
Fix channel membership prefixes in cached WHO replies
Channel membership prefixes in WHO replies (RPL_WHOREPLY and
RPL_WHOSPCRPL) were cached in the user's flags, which meant those same
prefixes were returned on future cache hits, even though the flags are
channel specific.
Strip the channel membership prefixes from the user's flags before
adding a user to the cache and add the prefixes back when reading from
the cache (using the membership info from the NAMES reply).
xirc: fix chunking in GenerateSASL
The SASL response needs to be encoded into base64, then split into
400 byte chunks. We were doing it in reverse order.
Set IRC, WS and HTTP Unix sockets' mode to 775
It was 755 before, so a reverse proxy running as a different user didn't
have permission to connect.
doc: document username argument for "user status"
service: user status: accept username filter
This is useful for getting information about a particular user,
especially when the server has more than the max amount of users
returned by the command.
Include prefix in CAP messages again
Buggy clients like hexchat can't parse CAP otherwise, making it unable to connect at all. Prefix on CAP commands must be pretty ubiquitous if a major issue like that was never caught
Drop source prefix from most non-numeric server messages
Clients are supposed to handle these just fine without a source
prefix.
Drop unnecessary prefixes for numerics
Previous commit populates the source prefix automatically for all
numerics. Drop the now-unnecessary explicit source prefix.
downstream: ensure numerics always carry a source prefix
From [1]:
> Distinct from a normal message, a numeric reply MUST contain a
> <source> and use a three-digit numeric as the command.
[1]: https://modern.ircdocs.horse/#numeric-replies
downstream: shallow copy message in SendMessage instead of deep copy
Fix missing prefix on away numerics
This fixes for example, being unable to use /back after going /away in hexchat. Hexchat is unable to parse the 305/306 numerics without the prefix, so assumes you aren't away, and doesn't let you run /back
upstream: fix panic on malformed RPL_CHANNELMODEIS
fileupload: fix http-origin pattern matching
Mirror what github.com/nhooyr/websocket does and match the host
only. Using the full URL never results in a match, because it
contains slash characters.
Add unix domain socket listeners for HTTP and WS
Automatically join a stored channel on INVITE
Some channels are typically protected with a legacy bot to which
a message is sent, causing the bot to send an INVITE to a channel,
which is invite-only.
Previously, a connect-command for sending a custom message to the
bot could be added, but there was no way to automatically accept
the invite.
This commit enables soju to automatically join a previously saved
channel when we receive an invite to it.
Examples:
- Joining #restricted, then getting disconnected from the upstream,
sending a message to the bot, receiving an invite and accepting it
- Joining #watercooler, getting kicked, then invited again after a
while
We eat the INVITE event so that we just transparently join the
channel without warning all downstreams.
Of course, of note is that we do *not* accept invites of
unknown/unsaved channels.
Thanks to eju for finding the issue and providing a first patch.