Allow negative coordinates

Fixes #25
This commit is contained in:
Maddie Zhan 2021-05-21 14:21:45 +08:00
parent c755a05b61
commit dcb9882978

View File

@ -68,7 +68,7 @@ func getIPInfo(addr string) results.IPInfoResponse {
}
func SetServerLocation(conf *config.Config) {
if conf.ServerLat > 0 && conf.ServerLng > 0 {
if conf.ServerLat != 0 || conf.ServerLng != 0 {
log.Infof("Configured server coordinates: %.6f, %.6f", conf.ServerLat, conf.ServerLng)
serverCoord.Lat = conf.ServerLat
serverCoord.Lon = conf.ServerLng