pull/18/head
Hugo Landau 10 years ago
parent 54d2ee1ff0
commit b3ff2d655a

@ -63,13 +63,15 @@ func NewServer(cfg *ServerConfig) (s *Server, err error) {
s.cfg.canonicalNameservers[i] = dns.Fqdn(s.cfg.canonicalNameservers[i]) s.cfg.canonicalNameservers[i] = dns.Fqdn(s.cfg.canonicalNameservers[i])
} }
vanityIPs := strings.Split(s.cfg.VanityIPs, ",") if s.cfg.VanityIPs != "" {
for _, ips := range vanityIPs { vanityIPs := strings.Split(s.cfg.VanityIPs, ",")
ip := net.ParseIP(ips) for _, ips := range vanityIPs {
if ip == nil { ip := net.ParseIP(ips)
return nil, fmt.Errorf("Couldn't parse IP: %s", ips) if ip == nil {
return nil, fmt.Errorf("Couldn't parse IP: %s", ips)
}
s.cfg.vanityIPs = append(s.cfg.vanityIPs, ip)
} }
s.cfg.vanityIPs = append(s.cfg.vanityIPs, ip)
} }
s.namecoinConn = namecoin.Conn{ s.namecoinConn = namecoin.Conn{

Loading…
Cancel
Save