summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-rw-r--r--src/map/clif.c10
-rw-r--r--src/map/map.c1
2 files changed, 9 insertions, 2 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 16c3b4589..b6044c166 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -153,6 +153,7 @@ enum {
static char map_ip_str[16];
static in_addr_t map_ip;
+static in_addr_t bind_ip = INADDR_ANY;
static int map_port = 5121;
int map_fd;
char talkie_mes[80];
@@ -167,6 +168,11 @@ void clif_setip(char *ip)
map_ip = inet_addr(map_ip_str);
}
+void clif_setbindip(char *ip)
+{
+ bind_ip = inet_addr(ip);
+}
+
/*==========================================
* mapŽI‚ÌportÝ’è
*------------------------------------------
@@ -11357,14 +11363,14 @@ int do_init_clif(void) {
set_defaultparse(clif_parse);
#ifdef __WIN32
//if (!make_listen_port(map_port)) {
- if (!make_listen_bind(map_ip,map_port)) {
+ if (!make_listen_bind(bind_ip,map_port)) {
printf("cant bind game port\n");
exit(1);
}
#else
for(i = 0; i < 10; i++) {
//if (make_listen_port(map_port))
- if (make_listen_bind(map_ip,map_port))
+ if (make_listen_bind(bind_ip,map_port))
break;
sleep(20);
}
diff --git a/src/map/map.c b/src/map/map.c
index c0f3aa046..d7c7cd2aa 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -2132,6 +2132,7 @@ int map_delmap(char *mapname) {
}
static int map_ip_set_ = 0;
+static int bind_ip_set_ = 0;
static int char_ip_set_ = 0;
/*==========================================