Warn about non-FQDN hostnames
References: https://github.com/ircdocs/modern-irc/pull/148
This commit is contained in:
parent
c7039da54b
commit
8b926be817
@ -71,6 +71,11 @@ func loadConfig() (*config.Server, *soju.Config, error) {
|
|||||||
raw = config.Defaults()
|
raw = config.Defaults()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// A hostname without a dot can confuse clients
|
||||||
|
if !strings.Contains(raw.Hostname, ".") {
|
||||||
|
log.Printf("warning: hostname %q is not a fully qualified domain name", raw.Hostname)
|
||||||
|
}
|
||||||
|
|
||||||
var motd string
|
var motd string
|
||||||
if raw.MOTDPath != "" {
|
if raw.MOTDPath != "" {
|
||||||
b, err := ioutil.ReadFile(raw.MOTDPath)
|
b, err := ioutil.ReadFile(raw.MOTDPath)
|
||||||
|
Loading…
Reference in New Issue
Block a user