# HG changeset patch # User Kim Alvefur # Date 1699874537 -3600 # Node ID 0c9606770db192dcbba4dfcedd54de0de61b88f4 # Parent 37ba9478b387d1a9ffed01dcae5a59a09274b9ea mod_audit: Also record human-readable name of country Nicer to show in graphs but less machine-usable Throw in continent in case that turns out to be useful one day diff -r 37ba9478b387 -r 0c9606770db1 mod_audit/mod_audit.lua --- a/mod_audit/mod_audit.lua Mon Nov 13 12:14:31 2023 +0100 +++ b/mod_audit/mod_audit.lua Mon Nov 13 12:22:17 2023 +0100 @@ -93,8 +93,9 @@ end if attach_location and remote_ip then local geoip_info = remote_ip.proto == "IPv6" and geoip6_country:query_by_addr6(remote_ip.normal) or geoip4_country:query_by_addr(remote_ip.normal); - stanza:tag("location", { + stanza:text_tag("location", geoip_info.name, { country = geoip_info.code; + continent = geoip_info.continent; }):up(); end if session.client_id then