diff --git a/src/shuo-irc.com/cmd/scream/main.go b/src/shuo-irc.com/cmd/scream/main.go new file mode 100644 index 0000000..06ab7d0 --- /dev/null +++ b/src/shuo-irc.com/cmd/scream/main.go @@ -0,0 +1 @@ +package main diff --git a/src/shuo-irc.com/config/conf.go b/src/shuo-irc.com/config/conf.go new file mode 100644 index 0000000..33683aa --- /dev/null +++ b/src/shuo-irc.com/config/conf.go @@ -0,0 +1,40 @@ +package config + +// Config is the main configuration type. +type Config struct { + Info Info // Basic information + DefaultNetworks map[string]*Network // List of "default" networks to choose from + Users 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 +} diff --git a/src/shuo-irc.com/config/doc.go b/src/shuo-irc.com/config/doc.go new file mode 100644 index 0000000..9241ff5 --- /dev/null +++ b/src/shuo-irc.com/config/doc.go @@ -0,0 +1,4 @@ +/* +Package config handles configuration for Scream. +*/ +package config