mirror of
https://github.com/idanoo/go-mastodon-matrix-webhooks.git
synced 2024-11-22 08:25:17 +00:00
Looking up logs
This commit is contained in:
parent
66468545ba
commit
3d4ec5c116
6
main.go
6
main.go
@ -116,15 +116,17 @@ func ipLookup(ip string) string {
|
||||
return ""
|
||||
}
|
||||
|
||||
log.Printf("Looking up: %s", ip)
|
||||
|
||||
db, err := ip2location.OpenDB(IP2LOCATION_FILE)
|
||||
if err != nil {
|
||||
fmt.Print(err)
|
||||
log.Print(err)
|
||||
return ""
|
||||
}
|
||||
results, err := db.Get_all(ip)
|
||||
|
||||
if err != nil {
|
||||
fmt.Print(err)
|
||||
log.Print(err)
|
||||
return ""
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user