scream/src/shuo-irc.com/config/conf.go

41 lines
1.3 KiB
Go

package config
// Config is the main configuration type.
type Config struct {
Info Info // Basic information
Network map[string]*Network // List of "default" networks to choose from
User map[string]*User // For now hardcoded list of users XXX fix this
Database Database // Database Config
}
// Info is basic information.
type Info struct {
Port string // The port to listen via HTTP on
Locked bool // Is this locked to a specific network or set of networks?
IRCv3 bool // Use IRCv3 stuff?
}
// Network is the IRC network that should be connected to.
type Network struct {
Host string // IRC server name
SSL bool // Connect over SSL?
Port string // Port to connect to
}
// User is an IRC user.
type User struct {
AuthMethod string // How to auth the user, Atheme or Local
Username string // alias to the map key name
ID string // unique ID for spoofing, ident, etc
Numeric int // Some number for the IP address
Gecos string // "Real Name"
Autojoin string // Channels to join on connect
Authcookie string // Atheme authcookie to use
}
// Database config.
type Database struct {
Driver string // SQLite or Postgres?
Connection string // Connection arguments needed by the database server
}