Find a file
delthas f5612ead04 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.
2024-03-31 22:23:01 +02:00
auth auth/pam: upgrade to github.com/msteinert/pam v2 2024-03-25 11:45:23 +01:00
cmd fileupload: add CORS header fields 2024-02-13 18:54:35 +01:00
config config: validate http-origin patterns 2024-02-13 18:54:35 +01:00
contrib contrib/clients: update information on ERC for Emacs 2024-02-22 11:50:19 +01:00
database database: move schema into separate file 2023-12-06 11:39:46 +01:00
doc doc: note that file uploads require an HTTP listener 2024-02-02 19:32:08 +01:00
fileupload fileupload: URL-escape output filename 2024-03-11 11:46:26 +01:00
identd identd: use UNKNOWN for OS name 2023-02-23 13:27:25 +01:00
msgstore database: batch msg inserts 2023-10-25 16:03:00 +02:00
xirc Use * instead of nick in some numeric replies 2023-08-23 19:50:37 +02:00
.b4-config Add .b4-config 2023-11-28 14:53:07 +01:00
.build.yml ci: switch to alpine/latest 2021-10-15 09:59:53 +02:00
.editorconfig Add .editorconfig 2020-11-30 11:39:41 +01:00
.gitignore gitignore: add doc/sojuctl.1 2023-04-05 10:56:36 +02:00
certfp.go Split CertFP logic into separate file 2021-10-08 09:47:25 +02:00
config.in Listen on the default unix admin endpoint in the default configuration 2023-02-06 15:15:09 +01:00
conn.go Add conn.Shutdown 2023-12-11 11:50:16 +01:00
downstream.go downstream: fix FILEHOST endpoint 2024-01-25 13:09:49 +01:00
go.mod auth/pam: upgrade to github.com/msteinert/pam v2 2024-03-25 11:45:23 +01:00
go.sum auth/pam: upgrade to github.com/msteinert/pam v2 2024-03-25 11:45:23 +01:00
irc.go Ignore highlights in URLs 2024-03-01 11:33:01 +01:00
irc_test.go Ignore highlights in URLs 2024-03-01 11:33:01 +01:00
LICENSE Switch license to AGPLv3 2020-02-07 17:41:51 +01:00
Makefile build: improve readability of Go -ldflags 2023-10-21 18:22:56 +02:00
rate.go Add exponential backoff when re-connecting to upstream 2021-12-02 12:14:35 +01:00
README.md readme: merge paragraphs about GOFLAGS 2023-02-22 21:12:22 +01:00
server.go server: print error on getOrCreateUser failure 2024-03-25 22:03:49 +01:00
server_test.go Wire up server logger to testing package 2024-02-29 14:41:04 +01:00
service.go service: don't send PART if not joined in "channel delete" 2024-01-24 09:29:25 +01:00
service_test.go Hand-made word splitter for BouncerServ 2021-06-24 19:33:46 +02:00
upstream.go Automatically join a stored channel on INVITE 2024-03-31 22:23:01 +02:00
user.go upstream: use round-robin DNS resolution when per-user IPs are set up 2024-03-14 15:44:09 +01:00

soju

builds.sr.ht status

soju is a user-friendly IRC bouncer. soju connects to upstream IRC servers on behalf of the user to provide extra functionality. soju supports many features such as multiple users, numerous IRCv3 extensions, chat history playback and detached channels. It is well-suited for both small and large deployments.

Usage

Building and installing

Dependencies:

  • Go
  • BSD or GNU make
  • a C89 compiler (optional, for SQLite)
  • scdoc (optional, for man pages)

For end users, a Makefile is provided:

make
sudo make install

For development, you can use go run ./cmd/soju as usual.

To link with the system libsqlite3, set GOFLAGS="-tags=libsqlite3". To disable SQLite support, set GOFLAGS="-tags=nosqlite". To use an alternative SQLite library that does not require CGO, set GOFLAGS="-tags=moderncsqlite". To build with PAM authentication support, set GOFLAGS="-tags=pam".

Contributing

Send patches on the mailing list or on GitHub, report bugs on the issue tracker. Discuss in #soju on Libera Chat.

License

AGPLv3, see LICENSE.

Copyright (C) 2020 The soju Contributors