config

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2018 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// VERSION contains the IRChuu~ version.
	VERSION = "0.9.0"
	// LAYER contains IRChuu~ version in an integer (for comparison with
	// HQ server's last version).
	LAYER = 14
)

Variables

This section is empty.

Functions

func PopulateConfig

func PopulateConfig(file string) error

PopulateConfig copies the sample config to <path>.

func ReadConfig

func ReadConfig(path string) (error, *Irc, *Telegram, *Irchuu)

ReadConfig reads the configuration file.

Types

type Irc

type Irc struct {
	Server         string
	Port           uint16
	SSL            bool
	ServerPassword string

	Nick     string
	Password string
	SASL     bool

	Channel      string
	ChanPassword string

	Colorize      bool
	Palette       []string
	Prefix        string
	Postfix       string
	MaxLength     int
	Ellipsis      string
	FloodDelay    int
	AllowStickers bool

	Moderation          bool
	KickPermission      int
	MaxHist             int
	NamesUpdateInterval int
	SendNotices         bool
	RelayJoinsParts     bool
	RelayModes          bool
	KickRejoin          bool
	AnnounceTopic       bool

	Debug bool
}

Irc is the stuct of IRC part in config.

type Irchuu

type Irchuu struct {
	DBURI        string
	SendStats    bool
	CheckUpdates bool
}

Irchuu is the struct of common part in config.

type Telegram

type Telegram struct {
	Token string
	Group int64

	TTL int64

	Prefix  string
	Postfix string

	AllowBots    bool
	AllowInvites bool
	Moderation   bool

	DownloadMedia bool
	Storage       string
	CertFilePath  string
	KeyFilePath   string
	ServerPort    uint16
	ReadTimeout   int
	WriteTimeout  int
	BaseURL       string
	DataDir       string
	Pomf          string
	Komf          string
	KomfPublicURL string
	KomfDate      string
}

Telegram is the struct of Telegram part in config.

Jump to

Keyboard shortcuts

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