v0.3.0 17 days ago

soju v0.3.0

Highlights for this release:

- Improved protocol support: MONITOR, WHOX, ELIST, account-notify,
  CHATHISTORY LATEST, draft/event-playback, draft/extended-monitor
- PostgreSQL support for larger deployments
- Instrumentation via Prometheus and a new "server status" BouncerServ command
- New config options: custom MOTD and bouncer title, maximum number of
  networks per user, globally disable multi-upstream mode, per-user IP
- Robustness improvements: add cancellation and timeouts throughout
- Most configuration options can be reloaded at runtime
- Add testing infrastructure

Full commit history below.

Alex Karle (1):
      chathistory: Fix truncated backlog due to timezones

Alexey Yerin (1):
      downstream: handle name=... in BOUNCER

Hubert Hirtz (8):
      Dismiss TAGMSGs directed to BouncerServ
      Send back TAGMSGs to self
      Correctly send back PRIVMSGs and NOTICEs to self
      PostgreSQL support
      db_postgres: handle both constraints on network updates
      Set hard timeouts on DB transactions
      Skip list/type A mode arguments
      Allow AUTHENTICATE before NICK

Simon Ser (109):
      db_sqlite: switch to sql.Named
      Add support for IRCv3 WebSocket text subprotocol
      db_sqlite: fix realname not fetched in ListUsers
      Close DB on shutdown
      Add basic server test
      Use isErrClosed in Server.Serve
      test: add upstream
      test: add NOTICE broadcast
      test: get rid of testUpstream
      Add "server status" command
      Add limit for RSA bits
      Add DB stats
      msgstore_fs: add limit on number of opened files
      Add WHOIS reply for BouncerServ
      doc/soju.1: mention that accept-proxy-ip affects PROXY proto
      Add max-user-networks config option
      build: don't clobber config file
      Split CertFP logic into separate file
      Add "server notice" command
      db_sqlite: add migration test
      db_postgres: add migration test
      Run server test with PostgreSQL too
      Fix unused imports in tests
      ci: run PostgreSQL tests
      service: allow updating other users
      Upgrade dependencies
      Fix printf formatting in error message
      msgstore_fs: fix ListTargets error on missing log dir
      Stop sending RPL_CREATED
      doc/soju.1: use angle-brackets for URL
      doc/soju.1: add descriptions for all flags for "user create"
      doc.soju.1: fix typo and improve formatting for "certfp generate"
      contrib/clients: update IRCv3 caps for Weechat 3.3
      db_postgres: fix constraints errors
      Add bouncer MOTD
      Don't strip spaces at start of MOTD
      db_postgres: quote table name in StoreClientDeliveryReceipts
      db_postgres: use tx for all queries in StoreClientDeliveryReceipts
      db_postgres: remove unnecessary DEFAULT NULL in schema
      msgstore_fs: add reference to ZNC
      ci: switch to alpine/latest
      msgstore_fs: rename log dir when network is renamed
      Remove unused REGISTRATION_IS_COMPLETED in handleMessageUnregistered
      Add support for account-notify
      Unify away-notify and account-notify handling
      Remove incorrect AWAY TODO in downstreamConn.SendMessage
      Remove unnecessary downstream cap checks
      Add context args to Database interface
      Always reply ERR_SASLABORTED on SASL abort
      Get rid of io.EOF errors in logs
      Fix missing imports in server.go
      Mark BouncerServ as server operator
      Mark admins as server operators in self WHO/WHOIS replies
      Fix operator flag in RPL_WHOREPLY
      Add support for WHOX
      Mark bouncer users and BouncerServ as authenticated in WHOX/WHOIS
      Add title config option
      db_sqlite: use TEXT instead of VARCHAR
      Make Network.Nick optional
      msgstore: take Network as arg instead of network
      msgstore: add context to messageStore methods
      msgstore_fs: abort on timeout
      msgstore_memory: add comment about Append dropping messages
      Turn CHATHISTORY and backlog limits into constants
      Set mode +o on admins for bouncer-only connections
      Add plus sign in RPL_UMODEIS reply
      Fix upstream USER command when both username and nick are empty
      Plumb context in downstreamConn.handleMessageRegistered
      Add context support to user and network mutations
      Add context support to service
      Check context cancellation in handleServiceServerNotice
      Add partial context support to handleUserUpdate
      Add context support to Server.createUser
      Remove support for mixed multi-upstream LIST
      Add a queue for WHO commands
      Add ELIST support in single-upstream mode
      Add support for MONITOR
      cmd/soju: bump max number of opened files
      Add panic handlers for user and downstream goroutines
      Don't send user in prefix for echo messages
      Allow most config options to be reloaded
      Add downstreamConn.isMultiUpstream
      Set isMultiUpstream flag in downstreamConn.welcome()
      Add config option to globally disable multi-upstream mode
      sojuctl: use background context
      contrib/znc-import: use background context
      Use background context in tests
      Add context arg to sanityCheckServer
      Lower sanityCheckServer timeout to 15s
      Add context to downstreamConn.handleMessageUnregistered
      Add context arg to downstreamConn.welcome()
      Lift up context to downstreamConn.handleMessage
      Introduce conn.NewContext
      Add timeout for downstream connection registration
      Add per-user IP addresses
      Update downstream caps/nick/realname before sending MOTD
      Add basic Prometheus metrics exporter
      Add basic active users and downstreams metrics
      Add int64 gauge abstraction
      Add number of upstream connections to metrics
      Add message counter metrics
      Add Prometheus instrumentation for the database
      Add pprof HTTP server
      Upgrade dependencies
      doc/per-user-ip: new documentation article
      Disallow empty string for nick
      contrib/clients: WeeChat 3.3 enables all IRCv3 caps by default

Thomas Vigouroux (1):
      Add CHATHISTORY LATEST support

delthas (4):
      Add support for draft/event-playback
      Add support for draft/extended-monitor
      Send the downstream host for PRIVMSG echo messages
      Return an empty CHATHISTORY TARGETS batch when in multi-upstream