summaryrefslogtreecommitdiff
path: root/src/map/map.c
diff options
context:
space:
mode:
author(no author) <(no author)@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-02-06 01:13:31 +0000
committer(no author) <(no author)@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-02-06 01:13:31 +0000
commit72a1ab426e87e8cc4fcb5dd4659e67a9e47feb3c (patch)
treee582d93b434c29ccfecd38afb62b714fb93dc5ce /src/map/map.c
parentf180cda1a2d7a0315508d9ff8f4c1f3196229207 (diff)
downloadhercules-72a1ab426e87e8cc4fcb5dd4659e67a9e47feb3c.tar.gz
hercules-72a1ab426e87e8cc4fcb5dd4659e67a9e47feb3c.tar.bz2
hercules-72a1ab426e87e8cc4fcb5dd4659e67a9e47feb3c.tar.xz
hercules-72a1ab426e87e8cc4fcb5dd4659e67a9e47feb3c.zip
didn't finsih bind code, now it's finished but export code isn't
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@1048 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/map.c')
-rw-r--r--src/map/map.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/map/map.c b/src/map/map.c
index 3a0b816c1..493a243ff 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -1091,7 +1091,7 @@ int map_quit(struct map_session_data *sd) {
numdb_erase(charid_db,sd->status.char_id);
free(p);
}
- }
+ }
strdb_erase(nick_db,sd->status.name);
numdb_erase(charid_db,sd->status.char_id);
numdb_erase(id_db,sd->bl.id);
@@ -1421,7 +1421,7 @@ int map_getcellp(struct map_data* m,int x,int y,cell_t cellchk)
return m->gat[j];
default:
return 0;
- }
+ }
}
/*==========================================
@@ -1701,7 +1701,7 @@ static int map_cache_write(struct map_data *m)
len_new = m->xs * m->ys;
write_buf = (char *) m->gat;
map_cache.map[i].compressed = 0;
- map_cache.map[i].compressed_len = 0;
+ map_cache.map[i].compressed_len = 0;
}
if(len_new <= len_old) {
// サイズが同じか小さくなったので場所は変わらない
@@ -2133,6 +2133,7 @@ int map_delmap(char *mapname) {
static int map_ip_set_ = 0;
static int char_ip_set_ = 0;
+//static int bind_ip_set_ = 0;
/*==========================================
* Console Command Parser [Wizputer]
@@ -2261,6 +2262,15 @@ int map_config_read(char *cfgName) {
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]);
}
clif_setip(w2);
+ } else if (strcmpi(w1, "bind_ip") == 0) {
+ //bind_ip_set_ = 1;
+ h = gethostbyname (w2);
+ if (h != NULL) {
+ snprintf(tmp_output,sizeof(tmp_output),"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]);
+ ShowInfo(tmp_output);
+ 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]);
+ }
+ clif_setbindip(w2);
} else if (strcmpi(w1, "map_port") == 0) {
clif_setport(atoi(w2));
map_port = (atoi(w2));