From e4ac10025dbb40b672e31aadb8cea71cb03199bf Mon Sep 17 00:00:00 2001 From: Berkay Date: Tue, 23 Sep 2025 00:32:01 +0300 Subject: [PATCH] chore: blockcountry, blockexception removed --- src/common/tables.h | 24 ----- src/db/BlockCountry.cpp | 214 ------------------------------------- src/db/BlockCountry.h | 44 -------- src/db/ClientManager.cpp | 56 ---------- src/db/ClientManager.h | 1 - src/db/Main.cpp | 3 - src/game/block_country.cpp | 151 -------------------------- src/game/block_country.h | 18 ---- src/game/db.cpp | 9 -- src/game/db.h | 4 - src/game/input.cpp | 14 --- src/game/input.h | 2 - src/game/input_db.cpp | 24 ----- src/game/input_login.cpp | 15 --- src/game/packet.h | 1 - 15 files changed, 580 deletions(-) delete mode 100644 src/db/BlockCountry.cpp delete mode 100644 src/db/BlockCountry.h delete mode 100644 src/game/block_country.cpp delete mode 100644 src/game/block_country.h diff --git a/src/common/tables.h b/src/common/tables.h index bcc69e3..c683b4f 100644 --- a/src/common/tables.h +++ b/src/common/tables.h @@ -119,8 +119,6 @@ enum HEADER_GD_DEC_MONARCH_MONEY = 125, HEADER_GD_CHANGE_MONARCH_LORD = 126, - HEADER_GD_BLOCK_COUNTRY_IP = 127, // 광대역 IP-Block - HEADER_GD_BLOCK_EXCEPTION = 128, // 광대역 IP-Block 예외 HEADER_GD_REQ_CHANGE_GUILD_MASTER = 129, @@ -252,8 +250,6 @@ enum HEADER_DG_CHANGE_MONARCH_LORD_ACK = 169, HEADER_DG_UPDATE_MONARCH_INFO = 170, - HEADER_DG_BLOCK_COUNTRY_IP = 171, // 광대역 IP-Block - HEADER_DG_BLOCK_EXCEPTION = 172, // 광대역 IP-Block 예외 account HEADER_DG_ACK_CHANGE_GUILD_MASTER = 173, @@ -1334,26 +1330,6 @@ typedef struct tChangeMonarchLordACK char szDate[32]; } TPacketChangeMonarchLordACK; -// Block Country Ip -typedef struct tBlockCountryIp -{ - uint32_t ip_from; - uint32_t ip_to; -} TPacketBlockCountryIp; - -enum EBlockExceptionCommand -{ - BLOCK_EXCEPTION_CMD_ADD = 1, - BLOCK_EXCEPTION_CMD_DEL = 2, -}; - -// Block Exception Account -typedef struct tBlockException -{ - uint8_t cmd; // 1 == add, 2 == delete - char login[LOGIN_MAX_LEN + 1]; -}TPacketBlockException; - typedef struct tChangeGuildMaster { uint32_t dwGuildID; diff --git a/src/db/BlockCountry.cpp b/src/db/BlockCountry.cpp deleted file mode 100644 index f4e2e04..0000000 --- a/src/db/BlockCountry.cpp +++ /dev/null @@ -1,214 +0,0 @@ -// vim:ts=4 sw=4 -/********************************************************************* - * date : 2007.05.31 - * file : BlockCountry.cpp - * author : mhh - * description : - */ - -#include "stdafx.h" - -#include "BlockCountry.h" - -#include "DBManager.h" - -#define DO_ALL_BLOCK_IP(iter) \ - for ((iter) = m_block_ip.begin(); (iter) != m_block_ip.end(); ++(iter)) - -#define DO_ALL_BLOCK_EXCEPTION(iter) \ - for ((iter) = m_block_exception.begin(); (iter) != m_block_exception.end(); ++(iter)) - -CBlockCountry::CBlockCountry() -{ - - - -} - -CBlockCountry::~CBlockCountry() -{ - BLOCK_IP *block_ip; - BLOCK_IP_VECTOR::iterator iter; - - DO_ALL_BLOCK_IP(iter) - { - block_ip = *iter; - delete block_ip; - } - - m_block_ip.clear(); -} - - -bool CBlockCountry::Load() -{ - // load blocked ip - { - char szQuery[256]; - snprintf(szQuery, sizeof(szQuery), "SELECT IP_FROM, IP_TO, COUNTRY_NAME FROM iptocountry"); - SQLMsg * pMsg = CDBManager::instance().DirectQuery(szQuery, SQL_ACCOUNT); - - if (pMsg->Get()->uiNumRows == 0) - { - sys_err(" DirectQuery failed(%s)", szQuery); - delete pMsg; - return false; - } - - MYSQL_ROW row; - for (int n = 0; (row = mysql_fetch_row(pMsg->Get()->pSQLResult)) != NULL; ++n) - { - BLOCK_IP *block_ip = new BLOCK_IP; - block_ip->ip_from = strtoul(row[0], NULL, 10); - block_ip->ip_to = strtoul(row[1], NULL, 10); - strlcpy(block_ip->country, row[2], sizeof(block_ip->country)); - - m_block_ip.push_back(block_ip); - sys_log(0, "BLOCKED_IP : %u - %u", block_ip->ip_from, block_ip->ip_to); - - } - delete pMsg; - } - - - // load block exception account - { - char szQuery[256]; - snprintf(szQuery, sizeof(szQuery), "SELECT login FROM block_exception"); - SQLMsg * pMsg = CDBManager::instance().DirectQuery(szQuery, SQL_ACCOUNT); - - if (pMsg->Get()->uiNumRows == 0) - { - sys_err(" DirectQuery failed(%s)", szQuery); - delete pMsg; - return true; - } - - MYSQL_ROW row; - for (int n = 0; (row = mysql_fetch_row(pMsg->Get()->pSQLResult)) != NULL; ++n) - { - const char *login = row[0]; - - m_block_exception.push_back(strdup(login)); - - sys_log(0, "BLOCK_EXCEPTION = %s", login); - - } - delete pMsg; - } - - return true; -} - -bool CBlockCountry::IsBlockedCountryIp(const char *user_ip) -{ - BLOCK_IP* block_ip; - BLOCK_IP_VECTOR::iterator iter; - struct in_addr st_addr; - -#ifndef OS_WINDOWS - if (0 == inet_aton(user_ip, &st_addr)) -#else - unsigned long in_address; - in_address = inet_addr(user_ip); - st_addr.s_addr = in_address; - if (INADDR_NONE == in_address) -#endif - return true; // 아이피가 괴상하니 일단 블럭처리 - - DO_ALL_BLOCK_IP(iter) - { - block_ip = *iter; - - if (st_addr.s_addr >= block_ip->ip_from && st_addr.s_addr <= block_ip->ip_to) - return true; - } - - return false; -} - -void CBlockCountry::SendBlockedCountryIp(CPeer *peer) -{ - sys_log(0, "SendBlockedCountryIp start"); - BLOCK_IP *block_ip; - BLOCK_IP_VECTOR::iterator iter; - TPacketBlockCountryIp packet; - - DO_ALL_BLOCK_IP(iter) - { - block_ip = *iter; - - packet.ip_from = block_ip->ip_from; - packet.ip_to = block_ip->ip_to; - - peer->EncodeHeader(HEADER_DG_BLOCK_COUNTRY_IP, 0, sizeof(TPacketBlockCountryIp)); - peer->Encode(&packet, sizeof(packet)); - } - - sys_log(0, "[DONE] CBlockCountry::SendBlockedCountryIp() : count = %d", - m_block_ip.size()); - sys_log(0, "SendBlockedCountryIp end"); -} /* end of CBlockCountry::SendBlockedCountryIp() */ - - -void CBlockCountry::SendBlockException(CPeer *peer) -{ - BLOCK_EXCEPTION_VECTOR::iterator iter; - - DO_ALL_BLOCK_EXCEPTION(iter) - { - const char *login = *iter; - - this->SendBlockExceptionOne(peer, login, BLOCK_EXCEPTION_CMD_ADD); - } -} /* end of CBlockCountry::SendBlockException() */ - -void CBlockCountry::SendBlockExceptionOne(CPeer *peer, const char *login, BYTE cmd) -{ - if (NULL == peer || NULL == login) - return; - - if (BLOCK_EXCEPTION_CMD_ADD != cmd && BLOCK_EXCEPTION_CMD_DEL != cmd) - return; - - TPacketBlockException packet; - - packet.cmd = cmd; - strlcpy(packet.login, login, sizeof(packet.login)); - - peer->EncodeHeader(HEADER_DG_BLOCK_EXCEPTION, 0, sizeof(TPacketBlockException)); - peer->Encode(&packet, sizeof(packet)); -} - -void CBlockCountry::AddBlockException(const char *login) -{ - BLOCK_EXCEPTION_VECTOR::iterator iter; - DO_ALL_BLOCK_EXCEPTION(iter) - { - const char *saved_login = *iter; - - if (!strcmp(saved_login, login)) - return; - } - - m_block_exception.push_back(strdup(login)); - return; -} - -void CBlockCountry::DelBlockException(const char *login) -{ - BLOCK_EXCEPTION_VECTOR::iterator iter; - DO_ALL_BLOCK_EXCEPTION(iter) - { - const char *saved_login = *iter; - - if (!strcmp(saved_login, login)) - { - ::free((void*)saved_login); - m_block_exception.erase(iter); - return; - } - } - return; -} - diff --git a/src/db/BlockCountry.h b/src/db/BlockCountry.h deleted file mode 100644 index efd3427..0000000 --- a/src/db/BlockCountry.h +++ /dev/null @@ -1,44 +0,0 @@ -// vim: ts=4 sw=4 -// Date : 2007.05.31 -// File : BlockCountry.h -// Author : mhh -// Description : - -#ifndef __INC_METIN_II_BLOCKCOUNTRY_H__ -#define __INC_METIN_II_BLOCKCOUNTRY_H__ - -#include "Peer.h" - -#define MAX_COUNTRY_NAME_LENGTH 50 - -class CBlockCountry : public singleton -{ - private: - struct BLOCK_IP - { - DWORD ip_from; - DWORD ip_to; - char country[MAX_COUNTRY_NAME_LENGTH + 1]; - }; - - typedef std::vector BLOCK_IP_VECTOR; - BLOCK_IP_VECTOR m_block_ip; - - typedef std::vector BLOCK_EXCEPTION_VECTOR; - BLOCK_EXCEPTION_VECTOR m_block_exception; - - public: - CBlockCountry(); - ~CBlockCountry(); - - public: - bool Load(); - bool IsBlockedCountryIp(const char *user_ip); - void SendBlockedCountryIp(CPeer *peer); - void SendBlockException(CPeer *peer); - void SendBlockExceptionOne(CPeer *peer, const char *login, BYTE cmd); - void AddBlockException(const char *login); - void DelBlockException(const char *login); -}; - -#endif diff --git a/src/db/ClientManager.cpp b/src/db/ClientManager.cpp index f050656..29d918c 100644 --- a/src/db/ClientManager.cpp +++ b/src/db/ClientManager.cpp @@ -16,7 +16,6 @@ #include "ItemAwardManager.h" #include "Marriage.h" #include "Monarch.h" -#include "BlockCountry.h" #include "ItemIDRangeManager.h" #include "Cache.h" @@ -2125,13 +2124,6 @@ void CClientManager::ProcessPackets(CPeer * peer) sys_log(0, " ProcessPacket Header [%d] Handle[%d] Length[%d] iCount[%d]", header, dwHandle, dwLength, iCount); } - - // test log by mhh - { - if (HEADER_GD_BLOCK_COUNTRY_IP == header) - sys_log(0, "recved : HEADER_GD_BLOCK_COUNTRY_IP"); - } - switch (header) { case HEADER_GD_BOOT: @@ -2472,17 +2464,6 @@ void CClientManager::ProcessPackets(CPeer * peer) ChangeMonarchLord(peer, dwHandle, (TPacketChangeMonarchLord*)data); break; - case HEADER_GD_BLOCK_COUNTRY_IP: - sys_log(0, "HEADER_GD_BLOCK_COUNTRY_IP received"); - CBlockCountry::instance().SendBlockedCountryIp(peer); - CBlockCountry::instance().SendBlockException(peer); - break; - - case HEADER_GD_BLOCK_EXCEPTION: - sys_log(0, "HEADER_GD_BLOCK_EXCEPTION received"); - BlockException((TPacketBlockException*) data); - break; - case HEADER_GD_REQ_SPARE_ITEM_ID_RANGE : SendSpareItemIDRange(peer); break; @@ -3990,43 +3971,6 @@ void CClientManager::ChangeMonarchLord(CPeer * peer, DWORD dwHandle, TPacketChan delete pMsg; } -void CClientManager::BlockException(TPacketBlockException *data) -{ - sys_log(0, "[BLOCK_EXCEPTION] CMD(%d) login(%s)", data->cmd, data->login); - - // save sql - { - char buf[1024]; - - switch (data->cmd) - { - case BLOCK_EXCEPTION_CMD_ADD: - snprintf(buf, sizeof(buf), "INSERT INTO block_exception VALUES('%s')", data->login); - CDBManager::instance().AsyncQuery(buf, SQL_ACCOUNT); - CBlockCountry::instance().AddBlockException(data->login); - break; - case BLOCK_EXCEPTION_CMD_DEL: - snprintf(buf, sizeof(buf), "DELETE FROM block_exception VALUES('%s')", data->login); - CDBManager::instance().AsyncQuery(buf, SQL_ACCOUNT); - CBlockCountry::instance().DelBlockException(data->login); - break; - default: - return; - } - - } - - for (itertype(m_peerList) it = m_peerList.begin(); it != m_peerList.end(); ++it) - { - CPeer *peer = *it; - - if (!peer->GetChannel()) - continue; - - CBlockCountry::instance().SendBlockExceptionOne(peer, data->login, data->cmd); - } -} - void CClientManager::SendSpareItemIDRange(CPeer* peer) { peer->SendSpareItemIDRange(); diff --git a/src/db/ClientManager.h b/src/db/ClientManager.h index 1726e5e..752e5c8 100644 --- a/src/db/ClientManager.h +++ b/src/db/ClientManager.h @@ -528,7 +528,6 @@ class CClientManager : public CNetBase, public singleton //END_MONARCH void ChangeMonarchLord(CPeer* peer, DWORD dwHandle, TPacketChangeMonarchLord* info); - void BlockException(TPacketBlockException *data); void SendSpareItemIDRange(CPeer* peer); diff --git a/src/db/Main.cpp b/src/db/Main.cpp index 0e738e6..df6dfaf 100644 --- a/src/db/Main.cpp +++ b/src/db/Main.cpp @@ -10,7 +10,6 @@ #include "MoneyLog.h" #include "Marriage.h" #include "Monarch.h" -#include "BlockCountry.h" #include "ItemIDRangeManager.h" #include #undef OS_FREEBSD @@ -79,7 +78,6 @@ int main() ItemAwardManager ItemAwardManager; marriage::CManager MarriageManager; CMonarch Monarch; - CBlockCountry BlockCountry; CItemIDRangeManager ItemIDRangeManager; if (!Start()) @@ -87,7 +85,6 @@ int main() GuildManager.Initialize(); MarriageManager.Initialize(); - BlockCountry.Load(); ItemIDRangeManager.Build(); sys_log(0, "Metin2DBCacheServer Start\n"); diff --git a/src/game/block_country.cpp b/src/game/block_country.cpp deleted file mode 100644 index f9b4f8b..0000000 --- a/src/game/block_country.cpp +++ /dev/null @@ -1,151 +0,0 @@ -/********************************************************************* - * date : 2007.05.31 - * file : block_country.cpp - * author : mhh - * description : - */ - -#define _block_country_cpp_ - -#include "stdafx.h" -#include "constants.h" -#include "block_country.h" -#include "dev_log.h" - -#define DEC_ITER(iter) std::vector::iterator iter -#define DO_ALL_BLOCKED_IP(iter) for ((iter)=s_blocked_ip.begin(); (iter)!=s_blocked_ip.end(); ++(iter)) - -#define DEC_EXCEPTION_ITER(iter) std::set::iterator iter - - -typedef struct { - DWORD ip_from; - DWORD ip_to; -} T_BLOCK_IP; - -//-------------------------------------- -// static variables -std::vector s_blocked_ip; -std::set s_block_exception; -// static variables -//-------------------------------------- - - - -//-------------------------------------- -// static functions -static void __add_block_exception(const char *login) -{ -dev_log(LOG_DEB0, "BLOCK_EXCEPTION_ADD : %s", login); - - DEC_EXCEPTION_ITER(iter); - std::string string_login(login); - - iter = s_block_exception.find(string_login); - - // can not find - if (iter==s_block_exception.end()) - { - s_block_exception.insert(string_login); - } -} - -static void __del_block_exception(const char *login) -{ -dev_log(LOG_DEB0, "BLOCK_EXCEPTION_DEL : %s", login); - - DEC_EXCEPTION_ITER(iter); - std::string string_login(login); - - iter = s_block_exception.find(string_login); - - // ok : find - if (iter!=s_block_exception.end()) - { - s_block_exception.erase(iter); - } -} -// static functions -//-------------------------------------- - - - - -void add_blocked_country_ip(TPacketBlockCountryIp *data) -{ - T_BLOCK_IP *block_ip = M2_NEW T_BLOCK_IP; - - block_ip->ip_from = data->ip_from; - block_ip->ip_to = data->ip_to; - - s_blocked_ip.push_back(block_ip); - - dev_log(LOG_DEB0, "BLOCKED_IP = %u - %u", block_ip->ip_from, block_ip->ip_to); -} - - -void block_exception(TPacketBlockException *data) -{ - if (NULL==data) return; - - if (BLOCK_EXCEPTION_CMD_ADD!=data->cmd && BLOCK_EXCEPTION_CMD_DEL!=data->cmd) - return; - - - switch (data->cmd) - { - case BLOCK_EXCEPTION_CMD_ADD: - __add_block_exception(data->login); - break; - case BLOCK_EXCEPTION_CMD_DEL: - __del_block_exception(data->login); - break; - } -} - -bool is_blocked_country_ip(const char *user_ip) -{ - DEC_ITER(iter); - T_BLOCK_IP *block_ip; - DWORD ip_number; - struct in_addr st_addr; - -#ifndef OS_WINDOWS - if (0 == inet_aton(user_ip, &st_addr)) -#else - unsigned long in_address; - in_address = inet_addr(user_ip); - st_addr.s_addr = in_address; - if (INADDR_NONE == in_address) -#endif - { - dev_log(LOG_INFO, "BLOCKED_COUNTRY_IP (%s) : YES", user_ip); - return true; // 아이피가 괴상하니 일단 블럭처리 - } - ip_number = htonl(st_addr.s_addr); - - DO_ALL_BLOCKED_IP(iter) - { - block_ip = *iter; - if ( block_ip->ip_from <= ip_number && ip_number <= block_ip->ip_to ) - { - dev_log(LOG_INFO, "BLOCKED_COUNTRY_IP (%s) : YES", user_ip); - return true; - } - } - - dev_log(LOG_INFO, "BLOCKED_COUNTRY_IP (%s) : NO", user_ip); - return false; -} - -bool is_block_exception(const char *login) -{ - std::string login_string(login); - std::set::iterator iter; - - iter = s_block_exception.find(login_string); - if (iter != s_block_exception.end()) - return true; - - return false; -} diff --git a/src/game/block_country.h b/src/game/block_country.h deleted file mode 100644 index de7f71e..0000000 --- a/src/game/block_country.h +++ /dev/null @@ -1,18 +0,0 @@ -/********************************************************************* - * date : 2007.05.31 - * file : block_country.h - * author : mhh - * description : - */ - -#ifndef _block_country_h_ -#define _block_country_h_ - - -void add_blocked_country_ip(TPacketBlockCountryIp *data); -void block_exception(TPacketBlockException *data); -bool is_blocked_country_ip(const char *user_ip); -bool is_block_exception(const char *login); - -#endif // _block_country_h_ - diff --git a/src/game/db.cpp b/src/game/db.cpp index 1bcb768..52d98f6 100644 --- a/src/game/db.cpp +++ b/src/game/db.cpp @@ -657,15 +657,6 @@ void VCardUse(LPCHARACTER CardOwner, LPCHARACTER CardTaker, LPITEM item) sys_log(0, "VCARD_TAKE: %u %s -> %s", p.dwID, CardOwner->GetName(), CardTaker->GetName()); } -void DBManager::RequestBlockException(const char *login, int cmd) -{ - TPacketBlockException packet; - - packet.cmd = cmd; - strlcpy(packet.login, login, sizeof(packet.login)); - db_clientdesc->DBPacket(HEADER_GD_BLOCK_EXCEPTION, 0, &packet, sizeof(packet)); -} - size_t DBManager::EscapeString(char* dst, size_t dstSize, const char *src, size_t srcSize) { return m_sql_direct.EscapeString(dst, dstSize, src, srcSize); diff --git a/src/game/db.h b/src/game/db.h index 32e7581..dedda49 100644 --- a/src/game/db.h +++ b/src/game/db.h @@ -93,10 +93,6 @@ class DBManager : public singleton DWORD CountQueryResult() { return m_sql.CountResult(); } void ResetQueryResult() { m_sql.ResetQueryFinished(); } - // BLOCK EXCEPTION - void RequestBlockException(const char *login, int cmd); - // BLOCK EXCEPTION - void LoadDBString(); const std::string & GetDBString(const std::string& key); const std::vector & GetGreetMessage(); diff --git a/src/game/input.cpp b/src/game/input.cpp index 9773e30..f171609 100644 --- a/src/game/input.cpp +++ b/src/game/input.cpp @@ -564,20 +564,6 @@ dev_log(LOG_DEB0, "DC : '%s'", msg.c_str()); } } } - else if (!stBuf.compare(0, 15, "BLOCK_EXCEPTION")) - { - // BLOCK_EXCEPTION cmd(add=1, del=2) login - std::istringstream is(stBuf); - std::string dummy_string; - std::string login_string; - int cmd; - - is >> dummy_string >> cmd >> login_string; - - sys_log(0, "block_exception %s:%d", login_string.c_str(), cmd); - DBManager::instance().RequestBlockException(login_string.c_str(), cmd); - stResult = "BLOCK_EXCEPTION_YES"; - } } } diff --git a/src/game/input.h b/src/game/input.h index a73bbd5..3037ae5 100644 --- a/src/game/input.h +++ b/src/game/input.h @@ -267,8 +267,6 @@ protected: void ChangeMonarchLord(TPacketChangeMonarchLordACK* data); void UpdateMonarchInfo(TMonarchInfo* data); - void AddBlockCountryIp(TPacketBlockCountryIp * data); - void BlockException(TPacketBlockException * data); // MYSHOP_PRICE_LIST /// 아이템 가격정보 리스트 요청에 대한 응답 패킷(HEADER_DG_MYSHOP_PRICELIST_RES) 처리함수 diff --git a/src/game/input_db.cpp b/src/game/input_db.cpp index 156014f..9aaf559 100644 --- a/src/game/input_db.cpp +++ b/src/game/input_db.cpp @@ -32,7 +32,6 @@ #include "monarch.h" #include "affect.h" #include "castle.h" -#include "block_country.h" #include "motion.h" #include "dev_log.h" @@ -1002,12 +1001,6 @@ void CInputDB::Boot(const char* data) // castle_boot castle_boot(); - - // request blocked_country_ip - { - db_clientdesc->DBPacket(HEADER_GD_BLOCK_COUNTRY_IP, 0, NULL, 0); - dev_log(LOG_DEB0, ""); - } } EVENTINFO(quest_login_event_info) @@ -2327,13 +2320,6 @@ int CInputDB::Analyze(LPDESC d, BYTE bHeader, const char * c_pData) UpdateMonarchInfo((TMonarchInfo*)c_pData); break; - case HEADER_DG_BLOCK_COUNTRY_IP: - this->AddBlockCountryIp((TPacketBlockCountryIp *) c_pData); - break; - case HEADER_DG_BLOCK_EXCEPTION: - this->BlockException((TPacketBlockException *) c_pData); - break; - case HEADER_DG_ACK_CHANGE_GUILD_MASTER : this->GuildChangeMaster((TPacketChangeGuildMaster*) c_pData); break; @@ -2484,16 +2470,6 @@ void CInputDB::UpdateMonarchInfo(TMonarchInfo* info) sys_log(0, "MONARCH INFO UPDATED"); } -void CInputDB::AddBlockCountryIp(TPacketBlockCountryIp * data) -{ - add_blocked_country_ip(data); -} - -void CInputDB::BlockException(TPacketBlockException *data) -{ - block_exception(data); -} - void CInputDB::GuildChangeMaster(TPacketChangeGuildMaster* p) { CGuildManager::instance().ChangeMaster(p->dwGuildID); diff --git a/src/game/input_login.cpp b/src/game/input_login.cpp index 82dc5e3..5a7235d 100644 --- a/src/game/input_login.cpp +++ b/src/game/input_login.cpp @@ -24,7 +24,6 @@ #include "arena.h" #include "OXEvent.h" #include "priv_manager.h" -#include "block_country.h" #include "dev_log.h" #include "log.h" #include "horsename_manager.h" @@ -140,20 +139,6 @@ void CInputLogin::LoginByKey(LPDESC d, const char * data) char login[LOGIN_MAX_LEN + 1]; trim_and_lower(pinfo->login, login, sizeof(login)); - // is blocked ip? - { - dev_log(LOG_DEB0, "check_blocked_country_start"); - - if (!is_block_exception(login) && is_blocked_country_ip(d->GetHostName())) - { - sys_log(0, "BLOCK_COUNTRY_IP (%s)", d->GetHostName()); - d->SetPhase(PHASE_CLOSE); - return; - } - - dev_log(LOG_DEB0, "check_blocked_country_end"); - } - if (g_bNoMoreClient) { TPacketGCLoginFailure failurePacket; diff --git a/src/game/packet.h b/src/game/packet.h index 402dd4b..4db6212 100644 --- a/src/game/packet.h +++ b/src/game/packet.h @@ -306,7 +306,6 @@ enum HEADER_GG_CHECK_CLIENT_VERSION = 21, HEADER_GG_BLOCK_CHAT = 22, - HEADER_GG_BLOCK_EXCEPTION = 24, HEADER_GG_SIEGE = 25, HEADER_GG_MONARCH_NOTICE = 26, HEADER_GG_MONARCH_TRANSFER = 27,