summaryrefslogtreecommitdiff
path: root/src/echar
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-07-05 01:57:52 +0300
committerAndrei Karas <akaras@inbox.ru>2015-07-05 01:57:52 +0300
commit7eaba97f02e18d8610ea004851ab2ec8b8edeebb (patch)
tree12bf9a8e1cd1b2e5813bb8985b70febf463dfc53 /src/echar
parentebff0ef78313b1090b2efa3a8d64d5493a9a5aed (diff)
downloadplugin-7eaba97f02e18d8610ea004851ab2ec8b8edeebb.tar.gz
plugin-7eaba97f02e18d8610ea004851ab2ec8b8edeebb.tar.bz2
plugin-7eaba97f02e18d8610ea004851ab2ec8b8edeebb.tar.xz
plugin-7eaba97f02e18d8610ea004851ab2ec8b8edeebb.zip
Remove inter server ip check because it moving to upstream.
Diffstat (limited to 'src/echar')
-rw-r--r--src/echar/char.c17
-rw-r--r--src/echar/char.h2
-rw-r--r--src/echar/config.c16
-rw-r--r--src/echar/config.h2
-rw-r--r--src/echar/init.c3
5 files changed, 0 insertions, 40 deletions
diff --git a/src/echar/char.c b/src/echar/char.c
index fc0fb6d..85c890c 100644
--- a/src/echar/char.c
+++ b/src/echar/char.c
@@ -13,26 +13,9 @@
#include "common/timer.h"
#include "char/char.h"
-#include "ecommon/ip.h"
#include "echar/char.h"
#include "echar/config.h"
-void echar_parse_char_login_map_server(int *fd)
-{
- if (!inter_server_ip)
- return;
-
- const uint32 ipl = session[*fd]->client_addr;
-
- const char *const ip = ip2str(ipl, NULL);
- if (!checkAllowedIp(inter_server_ip, ip))
- {
- ShowNotice("Connection of the map-server from ip %s REFUSED.\n", ip);
- chr->login_map_server_ack(*fd, 3);
- hookStop();
- }
-}
-
void echar_parse_char_create_new_char(int *fdPtr, struct char_session_data* sd)
{
// ignore char creation disable option
diff --git a/src/echar/char.h b/src/echar/char.h
index b013f44..60cf223 100644
--- a/src/echar/char.h
+++ b/src/echar/char.h
@@ -4,8 +4,6 @@
#ifndef EVOL_CHAR_CHAR
#define EVOL_CHAR_CHAR
-void echar_parse_char_login_map_server(int *fd);
-
void echar_parse_char_create_new_char(int *fdPtr, struct char_session_data* sd);
void echar_creation_failed(int *fdPtr, int *result);
diff --git a/src/echar/config.c b/src/echar/config.c
index f8cff5f..83bfba0 100644
--- a/src/echar/config.c
+++ b/src/echar/config.c
@@ -13,25 +13,11 @@
#include "echar/config.h"
-char *inter_server_ip = NULL;
int min_char_class = 0;
int max_char_class = 0;
int min_look = 0;
int max_look = 0;
-void config_inter_server_ip(const char *val)
-{
- char buf[1000];
-
- if (strlen(val) > 900)
- return;
-
- strcpy(buf, ",");
- strcat(buf, val);
- strcat(buf, ",");
- inter_server_ip = aStrdup(buf);
-}
-
void config_min_char_class(const char *val)
{
min_char_class = atoi(val);
@@ -54,6 +40,4 @@ void config_max_look(const char *val)
void config_final(void)
{
- if (inter_server_ip)
- aFree(inter_server_ip);
}
diff --git a/src/echar/config.h b/src/echar/config.h
index d60abc0..475a371 100644
--- a/src/echar/config.h
+++ b/src/echar/config.h
@@ -5,13 +5,11 @@
#define EVOL_CHAR_CONFIG
void config_final(void);
-void config_inter_server_ip(const char *val);
void config_min_char_class(const char *val);
void config_max_char_class(const char *val);
void config_min_look(const char *val);
void config_max_look(const char *val);
-extern char *inter_server_ip;
extern int min_char_class;
extern int max_char_class;
extern int min_look;
diff --git a/src/echar/init.c b/src/echar/init.c
index a167636..4083d17 100644
--- a/src/echar/init.c
+++ b/src/echar/init.c
@@ -63,9 +63,7 @@ HPExport void plugin_init (void)
addPacket(0x0061, 50, echar_parse_change_paassword, hpParse_Char);
addPacket(0x5001, 7, echar_parse_login_password_change_ack, hpParse_FromLogin);
- addHookPre("chr->parse_char_login_map_server", echar_parse_char_login_map_server);
addHookPre("chr->parse_char_create_new_char", echar_parse_char_create_new_char);
- //addHookPre("chr->parse_char_ping", echar_parse_char_ping);
addHookPre("chr->creation_failed", echar_creation_failed);
}
@@ -79,7 +77,6 @@ HPExport void server_preinit (void)
addMapInterConf("default_x", config_default_x);
addMapInterConf("default_y", config_default_y);
- addCharInterConf("inter_server_ip", config_inter_server_ip);
addCharConf("min_char_class", config_min_char_class);
addCharConf("max_char_class", config_max_char_class);
addCharConf("min_cloth_color", config_min_look);