From a087ad9e45ac64f2ae6258f729a68bcc224fe305 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sat, 12 Sep 2020 13:15:54 -0300 Subject: This is Hercules v2019.10.20 --- src/char/geoip.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/char/geoip.c') diff --git a/src/char/geoip.c b/src/char/geoip.c index 2870e5f0c..67c057aff 100644 --- a/src/char/geoip.c +++ b/src/char/geoip.c @@ -23,6 +23,7 @@ #include "geoip.h" #include "common/cbasetypes.h" +#include "common/conf.h" #include "common/memmgr.h" #include "common/showmsg.h" @@ -141,7 +142,9 @@ static void geoip_init(void) geoip->data->active = true; - db = fopen("./db/GeoIP.dat","rb"); + char file_path[256]; + libconfig->format_db_path("GeoIP.dat", file_path, sizeof(file_path)); + db = fopen(file_path, "rb"); if (db == NULL) { ShowError("geoip_readdb: Error reading GeoIP.dat!\n"); geoip->final(false); -- cgit v1.2.3-60-g2f50