summaryrefslogtreecommitdiff
path: root/src/map/map.c
diff options
context:
space:
mode:
authorLance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-06-21 10:55:26 +0000
committerLance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-06-21 10:55:26 +0000
commitbc03dcf3609194073da5fdf8e2e267a90f64cc48 (patch)
treee77c36250e9986b6b939bd875a0772db89d05df6 /src/map/map.c
parent3c585c70f62a60068cca56be027a4f02b958a787 (diff)
downloadhercules-bc03dcf3609194073da5fdf8e2e267a90f64cc48.tar.gz
hercules-bc03dcf3609194073da5fdf8e2e267a90f64cc48.tar.bz2
hercules-bc03dcf3609194073da5fdf8e2e267a90f64cc48.tar.xz
hercules-bc03dcf3609194073da5fdf8e2e267a90f64cc48.zip
* [Added]:
- DNS (WAN) sync for those pesky disconnections (dynamic ip renewal). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7275 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/map.c')
-rw-r--r--src/map/map.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/map/map.c b/src/map/map.c
index 70b9d290e..569c32f26 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -3297,6 +3297,10 @@ int map_config_read(char *cfgName) {
} else if (strcmpi(w1, "map_ip") == 0) {
map_ip_set_ = 1;
h = gethostbyname (w2);
+ if(map_server_dns)
+ aFree(map_server_dns);
+ map_server_dns = aCalloc(strlen(w2)+1,1);
+ strcpy(map_server_dns, w2);
if (h != NULL) {
ShowInfo("Map Server IP Address : '"CL_WHITE"%s"CL_RESET"' -> '"CL_WHITE"%d.%d.%d.%d"CL_RESET"'.\n", w2, (unsigned char)h->h_addr[0], (unsigned char)h->h_addr[1], (unsigned char)h->h_addr[2], (unsigned char)h->h_addr[3]);
sprintf(w2, "%d.%d.%d.%d", (unsigned char)h->h_addr[0], (unsigned char)h->h_addr[1], (unsigned char)h->h_addr[2], (unsigned char)h->h_addr[3]);
@@ -3709,6 +3713,8 @@ void do_final(void) {
pc_db->destroy(pc_db, NULL);
charid_db->destroy(charid_db, NULL);
+ if(map_server_dns) aFree(map_server_dns);
+
//#endif
#ifndef TXT_ONLY