From 16c1ab6cd36239f71ca38c521ddb650d58fc0707 Mon Sep 17 00:00:00 2001 From: idanoo Date: Sun, 20 Nov 2022 18:29:46 +1300 Subject: [PATCH] Fix --- main.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 3e2e72c..ceddc38 100644 --- a/main.go +++ b/main.go @@ -112,7 +112,9 @@ func sendWebhook(msgText string) error { // Lookup to country! func ipLookup(ip string) string { - log.Printf("Looking up: %s", ip) + if IP2LOCATION_FILE == "" { + return "" + } db, err := ip2location.OpenDB(IP2LOCATION_FILE) if err != nil {