diff options
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 |
commit | 1b58858969f704d37b67278bf9a0acfea0aeae0a (patch) | |
tree | c812c42b96c7b9602793dd476202522494921c03 /src/map/clif.c | |
parent | 34be37c4999ba473601bf7330cb73984298e61b8 (diff) | |
download | hercules-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/clif.c')
-rw-r--r-- | src/map/clif.c | 10 |
1 files changed, 8 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); } |