soju

package module
v0.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 6, 2022 License: AGPL-3.0 Imports: 50 Imported by: 0

README

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 (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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRetryListener added in v0.5.0

func NewRetryListener(ln net.Listener) net.Listener

Types

type Config added in v0.3.0

type Config struct {
	Hostname        string
	Title           string
	LogPath         string
	HTTPOrigins     []string
	AcceptProxyIPs  config.IPSet
	MaxUserNetworks int
	MultiUpstream   bool
	MOTD            string
	UpstreamUserIPs []*net.IPNet
}

type Logger

type Logger interface {
	Printf(format string, v ...interface{})
	Debugf(format string, v ...interface{})
}

func NewLogger added in v0.4.0

func NewLogger(out io.Writer, debug bool) Logger

type Server

type Server struct {
	Logger          Logger
	Identd          *identd.Identd        // can be nil
	MetricsRegistry prometheus.Registerer // can be nil
	// contains filtered or unexported fields
}

func NewServer

func NewServer(db database.Database) *Server

func (*Server) Config added in v0.3.0

func (s *Server) Config() *Config

func (*Server) Serve

func (s *Server) Serve(ln net.Listener) error

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, req *http.Request)

func (*Server) SetConfig added in v0.3.0

func (s *Server) SetConfig(cfg *Config)

func (*Server) Shutdown

func (s *Server) Shutdown()

func (*Server) Start

func (s *Server) Start() error

func (*Server) Stats added in v0.3.0

func (s *Server) Stats() *ServerStats

type ServerStats added in v0.3.0

type ServerStats struct {
	Users       int
	Downstreams int64
	Upstreams   int64
}

Directories

Path Synopsis
cmd
contrib
Package xirc contains an extended IRC library.
Package xirc contains an extended IRC library.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL