From 8867d978d868f6856cf0dd9eccbe1022c2814856 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 29 Nov 2014 16:16:48 +0300 Subject: Improve inter server ip limit checks. Also move this check into common. --- src/char/char.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/char/char.c') 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); -- cgit v1.2.3-60-g2f50