1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-09 14:23:12 +02:00

Add geoip_base module, which sets "geo_country" if a geo provider

module is able to lookup the IP and return a country.

Also consistently use geoip_ and GEOIP_ prefixes.
This commit is contained in:
Bram Matthys
2021-08-17 15:24:25 +02:00
parent 0bbad85f84
commit 2ea75dfbdb
7 changed files with 111 additions and 11 deletions
+3 -3
View File
@@ -1094,9 +1094,9 @@ MODVAR char *floodoption_names[] = {
* @param ip The IP to lookup
* @returns The country code, or NULL.
*/
char *geo_lookup(char *ip)
char *geoip_lookup_country(char *ip)
{
if (!RCallbacks[CALLBACKTYPE_GEO_LOOKUP])
if (!RCallbacks[CALLBACKTYPE_GEOIP_LOOKUP])
return NULL;
return RCallbacks[CALLBACKTYPE_GEO_LOOKUP]->func.pcharfunc(ip);
return RCallbacks[CALLBACKTYPE_GEOIP_LOOKUP]->func.pcharfunc(ip);
}