diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-11-29 16:16:48 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-11-29 16:16:48 +0300 |
commit | 8867d978d868f6856cf0dd9eccbe1022c2814856 (patch) | |
tree | 6c22360c73d190826c685a4c2ca5f1e28c2dbc40 /src/char | |
parent | 60833f07d7d563092570dbfdffaf1876921711d1 (diff) | |
download | plugin-8867d978d868f6856cf0dd9eccbe1022c2814856.tar.gz plugin-8867d978d868f6856cf0dd9eccbe1022c2814856.tar.bz2 plugin-8867d978d868f6856cf0dd9eccbe1022c2814856.tar.xz plugin-8867d978d868f6856cf0dd9eccbe1022c2814856.zip |
Improve inter server ip limit checks. Also move this check into common.
Diffstat (limited to 'src/char')
-rw-r--r-- | src/char/char.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/char/char.c b/src/char/char.c index fc9dd2d..d852f21 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -12,6 +12,7 @@ #include "../../../common/strlib.h" #include "../../../char/char.h" +#include "common/ip.h" #include "char/char.h" #include "char/config.h" @@ -23,7 +24,7 @@ void echar_parse_char_login_map_server(int *fd) const uint32 ipl = session[*fd]->client_addr; const char *const ip = ip2str(ipl, NULL); - if (!strstr(inter_server_ip, ip)) + if (!checkAllowedIp(inter_server_ip, ip)) { hookStop(); ShowNotice("Connection of the map-server from ip %s REFUSED.\n", ip); |