diff options
author | Jesusaves <cpntb1@ymail.com> | 2020-09-12 13:15:54 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2020-09-12 13:15:54 -0300 |
commit | a087ad9e45ac64f2ae6258f729a68bcc224fe305 (patch) | |
tree | e5faa695f9f0173f73d220da332d5cbd7a8876b2 /src/char/geoip.c | |
parent | 1443f47ca63972f737bd9cc0322f77dc416ff2a0 (diff) | |
download | hercules-a087ad9e45ac64f2ae6258f729a68bcc224fe305.tar.gz hercules-a087ad9e45ac64f2ae6258f729a68bcc224fe305.tar.bz2 hercules-a087ad9e45ac64f2ae6258f729a68bcc224fe305.tar.xz hercules-a087ad9e45ac64f2ae6258f729a68bcc224fe305.zip |
This is Hercules v2019.10.20r12.5_BUGGY
Diffstat (limited to 'src/char/geoip.c')
-rw-r--r-- | src/char/geoip.c | 5 |
1 files changed, 4 insertions, 1 deletions
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); |