diff --git a/dlls/geoip/GeoIP2/maxminddb.cpp b/dlls/geoip/GeoIP2/maxminddb.cpp index a380720d..116df6f4 100644 --- a/dlls/geoip/GeoIP2/maxminddb.cpp +++ b/dlls/geoip/GeoIP2/maxminddb.cpp @@ -611,7 +611,7 @@ MMDB_lookup_result_s MMDB_lookup_string(MMDB_s *const mmdb, LOCAL int resolve_any_address(const char *ipstr, struct addrinfo **addresses) { struct addrinfo hints; - memset(&hints, 0, sizeof(addrinfo)); // getaddrinfo doesn't like garbage. + memset(&hints, 0, sizeof(addrinfo)); // getaddrinfo doesn't like garbage. hints.ai_socktype = SOCK_STREAM; int gai_status; diff --git a/dlls/geoip/geoip_util.cpp b/dlls/geoip/geoip_util.cpp index 0af8af34..52b50b22 100644 --- a/dlls/geoip/geoip_util.cpp +++ b/dlls/geoip/geoip_util.cpp @@ -139,12 +139,13 @@ double lookupDouble(const char *ip, const char **path) int getContinentId(const char *code) { #define CONTINENT_UNKNOWN 0 - #define CONTINENT_AFRICA 1 - #define CONTINENT_ASIA 2 - #define CONTINENT_EUROPE 3 - #define CONTINENT_NORTH_AMERICA 4 - #define CONTINENT_OCEANIA 5 - #define CONTINENT_SOUTH_AMERICA 6 + #define CONTINENT_AFRICA 1 + #define CONTINENT_ANTARCTICA 2 + #define CONTINENT_ASIA 3 + #define CONTINENT_EUROPE 4 + #define CONTINENT_NORTH_AMERICA 5 + #define CONTINENT_OCEANIA 6 + #define CONTINENT_SOUTH_AMERICA 7 int index = CONTINENT_UNKNOWN; @@ -157,6 +158,7 @@ int getContinentId(const char *code) switch (code[1]) { case 'F': index = CONTINENT_AFRICA; break; + case 'N': index = CONTINENT_ANTARCTICA; break; case 'S': index = CONTINENT_ASIA; break; } } diff --git a/plugins/include/geoip.inc b/plugins/include/geoip.inc index 7739f0dc..19ea3746 100755 --- a/plugins/include/geoip.inc +++ b/plugins/include/geoip.inc @@ -197,8 +197,8 @@ native Float:geoip_distance(Float:lat1, Float:lon1, Float:lat2, Float:lon2, syst * Look up the continent code for a given IP address. * * @note The code can be retrieved as integer (See CONTINENT_* constants.) or string (2 characters). - * @note Possible continent codes are AF, AS, EU, NA, OC, SA for - * Africa(1), Asia(2), Europe(3), North America(4), Oceania(5) and South America(6). + * @note Possible continent codes are AF, AN, AS, EU, NA, OC, SA for + * Africa(1), Antarctica(2), Asia(3), Europe(4), North America(5), Oceania(6), South America(7). * * @param ip The IP address to look up. * @param result The result of the geoip look up. @@ -209,11 +209,12 @@ enum Continent { CONTINENT_UNKNOW = 0, CONTINENT_AFRICA, + CONTINENT_ANTARCTICA, CONTINENT_ASIA, CONTINENT_EUROPE, CONTINENT_NORTH_AMERICA, CONTINENT_OCEANIA, - CONTINENT_SOUTH_AMERICA + CONTINENT_SOUTH_AMERICA, }; native Continent:geoip_continent_code(const ip[], result[3]);