mirror of
https://github.com/idanoo/go-mastodon-matrix-webhooks.git
synced 2024-11-22 08:25:17 +00:00
Fix
This commit is contained in:
parent
a79690870c
commit
16c1ab6cd3
4
main.go
4
main.go
@ -112,7 +112,9 @@ func sendWebhook(msgText string) error {
|
|||||||
|
|
||||||
// Lookup to country!
|
// Lookup to country!
|
||||||
func ipLookup(ip string) string {
|
func ipLookup(ip string) string {
|
||||||
log.Printf("Looking up: %s", ip)
|
if IP2LOCATION_FILE == "" {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
db, err := ip2location.OpenDB(IP2LOCATION_FILE)
|
db, err := ip2location.OpenDB(IP2LOCATION_FILE)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user