soju forked to be LESS SHIT
Go to file
Simon Ser d321fcd9f0 upstream: fix missing WHOIS in abortPendingCommands
Fixes the following panic:

    2022/05/03 08:05:32 panic serving user "asdf": Unsupported pending command "WHOIS"
    goroutine 15 [running]:
    runtime/debug.Stack()
            /opt/go/src/runtime/debug/stack.go:24 +0x65
    git.sr.ht/~emersion/soju.(*Server).addUserLocked.func1.1()
            ~/soju/server.go:317 +0x5d
    panic({0xa18da0, 0x6815bf10})
            /opt/go/src/runtime/panic.go:838 +0x207
    git.sr.ht/~emersion/soju.(*upstreamConn).abortPendingCommands(0x6811c9c0)
            ~/soju/upstream.go:338 +0x953
    git.sr.ht/~emersion/soju.(*user).handleUpstreamDisconnected(0x680b7080, 0x6811c9c0)
            ~/soju/user.go:744 +0x6d
    git.sr.ht/~emersion/soju.(*user).updateNetwork(0x680b7080, {0xb99a00, 0x684690e0}, 0x681343c0)
            ~/soju/user.go:936 +0x387
    git.sr.ht/~emersion/soju.handleServiceNetworkUpdate({0xb99a00, 0x684690e0}, 0x68116000, {0x681b8a20?, 0x40429108?, 0x10?})
            ~/soju/service.go:590 +0x14f
    git.sr.ht/~emersion/soju.handleServicePRIVMSG({0xb99a00, 0x684690e0}, 0x68116000, {0x680af5d5?, 0x1?})
            ~/soju/service.go:146 +0x7df
    git.sr.ht/~emersion/soju.(*downstreamConn).handleMessageRegistered(0x68116000, {0xb99a00, 0x684690e0}, 0x681b8940)
            ~/soju/downstream.go:2503 +0x9e9e
    git.sr.ht/~emersion/soju.(*downstreamConn).handleMessage(0x68116000, {0xb999c8?, 0x680240a0?}, 0x681b8940)
            ~/soju/downstream.go:727 +0xde
    git.sr.ht/~emersion/soju.(*user).run(0x680b7080)
            ~/soju/user.go:690 +0xe05
    git.sr.ht/~emersion/soju.(*Server).addUserLocked.func1()
            ~/soju/server.go:327 +0x70
    created by git.sr.ht/~emersion/soju.(*Server).addUserLocked
            ~/soju/server.go:314 +0x178
2022-05-03 08:33:20 +02:00
cmd Fix build on systems without syscall.Rlimit 2022-03-21 09:39:54 +01:00
config Add per-user IP addresses 2021-11-17 15:07:58 +01:00
contrib contrib/clients: Add information about irssi 2022-04-16 08:06:20 +02:00
doc doc/ext/bouncer-networks: specify how attributes are cleared in notifications 2022-05-01 19:37:36 +02: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 doc: document "network delete" 2020-04-01 17:38:09 +02:00
LICENSE Switch license to AGPLv3 2020-02-07 17:41:51 +01:00
Makefile makefile: switch to BSD/GNU make 2022-02-08 16:10:19 +01:00
README.md readme: restrict CI badge to master branch 2022-04-28 14:13:13 +02:00
bridge.go Add the soju.im/no-implicit-names extension 2022-03-22 21:03:20 +01:00
certfp.go Split CertFP logic into separate file 2021-10-08 09:47:25 +02:00
config.in Make db and log config options more future-proof 2021-04-21 18:15:04 +02:00
conn.go Add context to {conn,upstreamConn}.SendMessage 2021-12-08 18:03:40 +01:00
db.go Allow nil network in Get{Nick,Username,Realname} 2022-03-30 14:17:09 +02:00
db_postgres.go db_postgres: report network metrics with hostname label 2022-03-08 11:04:23 +01:00
db_postgres_test.go db_postgres: add migration test 2021-10-11 15:55:07 +02:00
db_sqlite.go db: allow registering multiple metrics collectors 2022-03-08 10:36:59 +01:00
db_sqlite_test.go db_sqlite: add migration test 2021-10-11 12:26:51 +02:00
downstream.go downstream: improve error message on unrecognized message 2022-04-27 19:05:01 +02:00
go.mod Upgrade dependencies 2022-03-03 09:00:36 +01:00
go.sum Upgrade dependencies 2022-03-03 09:00:36 +01:00
ident.go Retry on temporary net.Listener failure 2022-01-19 22:35:46 +01:00
irc.go Simplify and improve WHOIS forwarding 2022-04-04 09:28:04 +02:00
irc_test.go irc: add isHighlight tests 2022-02-25 11:31:41 +01:00
msgstore.go Add support for the SEARCH extension 2022-04-12 17:58:16 +02:00
msgstore_fs.go Add support for the SEARCH extension 2022-04-12 17:58:16 +02:00
msgstore_memory.go msgstore_memory: add comment about Append dropping messages 2021-11-03 18:25:39 +01:00
net_go113.go go fmt: add go:build tags 2021-09-09 10:07:37 +02:00
net_go116.go go fmt: add go:build tags 2021-09-09 10:07:37 +02:00
rate.go Add exponential backoff when re-connecting to upstream 2021-12-02 12:14:35 +01:00
server.go Remove unnecessary lastDownstreamID initialization 2022-04-04 09:59:16 +02:00
server_test.go Use background context in tests 2021-11-17 12:04:24 +01:00
service.go Require an explicit `*` network suffix for multi-upstream 2022-03-21 09:56:20 +01:00
service_test.go Hand-made word splitter for BouncerServ 2021-06-24 19:33:46 +02:00
upstream.go upstream: fix missing WHOIS in abortPendingCommands 2022-05-03 08:33:20 +02:00
user.go Fix network.forEachDownstream exiting on first non-match 2022-04-24 18:52:36 +02:00

README.md

soju

builds.sr.ht status

A user-friendly IRC bouncer.

  • Multi-user
  • Support multiple clients for a single user, with proper backlog synchronization
  • Support connecting to multiple upstream servers via a single IRC connection to the bouncer

Usage

Building and installing

Dependencies:

  • Go
  • BSD or GNU make
  • a C89 compiler (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".

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