From 00c5634c0971b67272d90dc5580c2551a12862cc Mon Sep 17 00:00:00 2001 From: Exynox Date: Sat, 30 Mar 2024 17:09:03 +0200 Subject: [PATCH] Removed country blocking (and exceptions) --- src/common/tables.h | 24 ---- src/db/src/BlockCountry.cpp | 214 --------------------------------- src/db/src/BlockCountry.h | 44 ------- src/db/src/ClientManager.cpp | 49 -------- src/db/src/ClientManager.h | 1 - src/db/src/Main.cpp | 3 - src/game/src/block_country.cpp | 150 ----------------------- src/game/src/block_country.h | 18 --- src/game/src/db.cpp | 9 -- src/game/src/db.h | 4 - src/game/src/input.cpp | 14 --- src/game/src/input.h | 2 - src/game/src/input_db.cpp | 24 ---- src/game/src/input_login.cpp | 15 --- src/game/src/packet.h | 1 - 15 files changed, 572 deletions(-) delete mode 100644 src/db/src/BlockCountry.cpp delete mode 100644 src/db/src/BlockCountry.h delete mode 100644 src/game/src/block_country.cpp delete mode 100644 src/game/src/block_country.h diff --git a/src/common/tables.h b/src/common/tables.h index e50b236..f604719 100644 --- a/src/common/tables.h +++ b/src/common/tables.h @@ -129,8 +129,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, @@ -272,8 +270,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, @@ -1379,26 +1375,6 @@ typedef struct tChangeMonarchLordACK char szDate[32]; } TPacketChangeMonarchLordACK; -// Block Country Ip -typedef struct tBlockCountryIp -{ - DWORD ip_from; - DWORD ip_to; -} TPacketBlockCountryIp; - -enum EBlockExceptionCommand -{ - BLOCK_EXCEPTION_CMD_ADD = 1, - BLOCK_EXCEPTION_CMD_DEL = 2, -}; - -// Block Exception Account -typedef struct tBlockException -{ - BYTE cmd; // 1 == add, 2 == delete - char login[LOGIN_MAX_LEN + 1]; -}TPacketBlockException; - typedef struct tChangeGuildMaster { DWORD dwGuildID; diff --git a/src/db/src/BlockCountry.cpp b/src/db/src/BlockCountry.cpp deleted file mode 100644 index bb69e80..0000000 --- a/src/db/src/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) - { - SPDLOG_ERROR(" DirectQuery failed({})", 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); - SPDLOG_DEBUG("BLOCKED_IP : {} - {}", 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) - { - SPDLOG_ERROR(" DirectQuery failed({})", 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)); - - SPDLOG_DEBUG("BLOCK_EXCEPTION = {}", 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 __WIN32__ - if (0 == inet_aton(user_ip, &st_addr)) -#else - unsigned int 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) -{ - SPDLOG_DEBUG("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)); - } - - SPDLOG_DEBUG("[DONE] CBlockCountry::SendBlockedCountryIp() : count = {}", - m_block_ip.size()); - SPDLOG_DEBUG("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/src/BlockCountry.h b/src/db/src/BlockCountry.h deleted file mode 100644 index 7e41e41..0000000 --- a/src/db/src/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/src/ClientManager.cpp b/src/db/src/ClientManager.cpp index 45d4c51..1d5e40a 100644 --- a/src/db/src/ClientManager.cpp +++ b/src/db/src/ClientManager.cpp @@ -17,7 +17,6 @@ #include "ItemAwardManager.h" #include "Marriage.h" #include "Monarch.h" -#include "BlockCountry.h" #include "ItemIDRangeManager.h" #include "Cache.h" #ifdef __AUCTION__ @@ -2672,17 +2671,6 @@ void CClientManager::ProcessPackets(CPeer * peer) ChangeMonarchLord(peer, dwHandle, (TPacketChangeMonarchLord*)data); break; - case HEADER_GD_BLOCK_COUNTRY_IP: - SPDLOG_DEBUG("HEADER_GD_BLOCK_COUNTRY_IP received"); - CBlockCountry::instance().SendBlockedCountryIp(peer); - CBlockCountry::instance().SendBlockException(peer); - break; - - case HEADER_GD_BLOCK_EXCEPTION: - SPDLOG_DEBUG("HEADER_GD_BLOCK_EXCEPTION received"); - BlockException((TPacketBlockException*) data); - break; - case HEADER_GD_REQ_SPARE_ITEM_ID_RANGE : SendSpareItemIDRange(peer); break; @@ -4190,43 +4178,6 @@ void CClientManager::ChangeMonarchLord(CPeer * peer, DWORD dwHandle, TPacketChan delete pMsg; } -void CClientManager::BlockException(TPacketBlockException *data) -{ - SPDLOG_DEBUG("[BLOCK_EXCEPTION] CMD({}) login({})", 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/src/ClientManager.h b/src/db/src/ClientManager.h index 251cd2a..a13e11a 100644 --- a/src/db/src/ClientManager.h +++ b/src/db/src/ClientManager.h @@ -545,7 +545,6 @@ class CClientManager : 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/src/Main.cpp b/src/db/src/Main.cpp index 271c4ef..6d9e53a 100644 --- a/src/db/src/Main.cpp +++ b/src/db/src/Main.cpp @@ -9,7 +9,6 @@ #include "MoneyLog.h" #include "Marriage.h" #include "Monarch.h" -#include "BlockCountry.h" #include "ItemIDRangeManager.h" #include #ifdef __AUCTION__ @@ -74,7 +73,6 @@ int main() ItemAwardManager ItemAwardManager; marriage::CManager MarriageManager; CMonarch Monarch; - CBlockCountry BlockCountry; CItemIDRangeManager ItemIDRangeManager; #ifdef __AUCTION__ AuctionManager auctionManager; @@ -84,7 +82,6 @@ int main() GuildManager.Initialize(); MarriageManager.Initialize(); - BlockCountry.Load(); ItemIDRangeManager.Build(); #ifdef __AUCTION__ AuctionManager::instance().Initialize(); diff --git a/src/game/src/block_country.cpp b/src/game/src/block_country.cpp deleted file mode 100644 index 6a1b70a..0000000 --- a/src/game/src/block_country.cpp +++ /dev/null @@ -1,150 +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" - -#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) -{ -SPDLOG_TRACE("BLOCK_EXCEPTION_ADD : {}", 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) -{ -SPDLOG_TRACE("BLOCK_EXCEPTION_DEL : {}", 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); - - SPDLOG_TRACE("BLOCKED_IP = {} - {}", 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 __WIN32__ - if (0 == inet_aton(user_ip, &st_addr)) -#else - unsigned int in_address; - in_address = inet_addr(user_ip); - st_addr.s_addr = in_address; - if (INADDR_NONE == in_address) -#endif - { - SPDLOG_INFO("BLOCKED_COUNTRY_IP ({}) : 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 ) - { - SPDLOG_INFO("BLOCKED_COUNTRY_IP ({}) : YES", user_ip); - return true; - } - } - - SPDLOG_DEBUG("BLOCKED_COUNTRY_IP ({}) : 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/src/block_country.h b/src/game/src/block_country.h deleted file mode 100644 index fe69e46..0000000 --- a/src/game/src/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/src/db.cpp b/src/game/src/db.cpp index e0a73e1..7278768 100644 --- a/src/game/src/db.cpp +++ b/src/game/src/db.cpp @@ -1198,15 +1198,6 @@ void DBManager::StopAllBilling() } } -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/src/db.h b/src/game/src/db.h index 21db8fc..27d3da1 100644 --- a/src/game/src/db.h +++ b/src/game/src/db.h @@ -111,10 +111,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/src/input.cpp b/src/game/src/input.cpp index 36329c6..d7055b8 100644 --- a/src/game/src/input.cpp +++ b/src/game/src/input.cpp @@ -543,20 +543,6 @@ int CInputHandshake::Analyze(LPDESC d, BYTE bHeader, const char * c_pData) } } } - 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; - - SPDLOG_DEBUG("block_exception {}:{}", login_string.c_str(), cmd); - DBManager::instance().RequestBlockException(login_string.c_str(), cmd); - stResult = "BLOCK_EXCEPTION_YES"; - } } } diff --git a/src/game/src/input.h b/src/game/src/input.h index e90d256..9bc3f48 100644 --- a/src/game/src/input.h +++ b/src/game/src/input.h @@ -268,8 +268,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/src/input_db.cpp b/src/game/src/input_db.cpp index a50047a..9fa1dd4 100644 --- a/src/game/src/input_db.cpp +++ b/src/game/src/input_db.cpp @@ -32,7 +32,6 @@ #include "monarch.h" #include "affect.h" #include "castle.h" -#include "block_country.h" #include "motion.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); - SPDLOG_TRACE(""); - } } EVENTINFO(quest_login_event_info) @@ -2426,13 +2419,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; @@ -2588,16 +2574,6 @@ void CInputDB::UpdateMonarchInfo(TMonarchInfo* info) SPDLOG_INFO("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/src/input_login.cpp b/src/game/src/input_login.cpp index d9a600a..cfe9d67 100644 --- a/src/game/src/input_login.cpp +++ b/src/game/src/input_login.cpp @@ -25,7 +25,6 @@ #include "arena.h" #include "OXEvent.h" #include "priv_manager.h" -#include "block_country.h" #include "log.h" #include "horsename_manager.h" #include "MarkManager.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? - { - SPDLOG_TRACE("check_blocked_country_start"); - - if (!is_block_exception(login) && is_blocked_country_ip(d->GetHostName())) - { - SPDLOG_DEBUG("BLOCK_COUNTRY_IP ({})", d->GetHostName()); - d->SetPhase(PHASE_CLOSE); - return; - } - - SPDLOG_TRACE("check_blocked_country_end"); - } - if (g_bNoMoreClient) { TPacketGCLoginFailure failurePacket; diff --git a/src/game/src/packet.h b/src/game/src/packet.h index 8b1eb1e..f906ad9 100644 --- a/src/game/src/packet.h +++ b/src/game/src/packet.h @@ -303,7 +303,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,