summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
author(no author) <(no author)@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-02-05 19:25:36 +0000
committer(no author) <(no author)@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-02-05 19:25:36 +0000
commit1b58858969f704d37b67278bf9a0acfea0aeae0a (patch)
treec812c42b96c7b9602793dd476202522494921c03 /src/map
parent34be37c4999ba473601bf7330cb73984298e61b8 (diff)
downloadhercules-1b58858969f704d37b67278bf9a0acfea0aeae0a.tar.gz
hercules-1b58858969f704d37b67278bf9a0acfea0aeae0a.tar.bz2
hercules-1b58858969f704d37b67278bf9a0acfea0aeae0a.tar.xz
hercules-1b58858969f704d37b67278bf9a0acfea0aeae0a.zip
Changed how IP Bindings are handled
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@1045 54d463be-8e91-2dee-dedb-b68131a5f0ec
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;
/*==========================================