From Hopmod Wiki
geoip.load_database(filename)
Load the GeoIP Country database.
geoip.ip_to_country(ipaddr)
Locate IP address to country and return the full country name.
geoip.ip_to_country_code(ipaddr)
Locate IP address to country and return the two-letter country code.