mirror of
https://github.com/ergochat/ergo.git
synced 2025-12-20 02:00:11 -08:00
Require that server names must be hostnames, and nicks cannot be hostnames
This commit is contained in:
parent
9ac09a7027
commit
77bf7173ff
3 changed files with 32 additions and 0 deletions
|
|
@ -110,6 +110,9 @@ func LoadConfig(filename string) (config *Config, err error) {
|
|||
if config.Server.Name == "" {
|
||||
return nil, errors.New("Server name missing")
|
||||
}
|
||||
if !IsHostname(config.Server.Name) {
|
||||
return nil, errors.New("Server name must match the format of a hostname")
|
||||
}
|
||||
if config.Server.Database == "" {
|
||||
return nil, errors.New("Server database missing")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue