Honorable Member Mali 42299 Posted August 17, 2019 Honorable Member Share Posted August 17, 2019 (edited) M2 Download Center This is the hidden content, please Sign In or Sign Up ( Internal ) This is the hidden content, please Sign In or Sign Up ( GitHub ) https://metin2.download/picture/V8c6YtUR94dQuCY6Z4cf2pbj299sr9cC/.png Create /usr/game/auth/BANIP. Then find IP at player.player ip table and add to file. Don't forget the left a space at the end. Example: Gm Command: This is the hidden content, please Sign In or Sign Up Edited August 25, 2022 by Metin2 Dev Core X - External 2 Internal 148 1 3 1 1 1 3 2 37 7 85 Link to comment Share on other sites More sharing options...
Contributor MrQuin 6452 Posted August 17, 2019 Contributor Share Posted August 17, 2019 (edited) Very nice. Edited May 16, 2022 by MrQuin Go fuck yourself NewWorld 1 1 My only accounts are here and on M2D, Don't trust anyone else from other shitty sites. Link to comment Share on other sites More sharing options...
Honorable Member Mali 42299 Posted August 17, 2019 Author Honorable Member Share Posted August 17, 2019 # Added GM command for easy to usage : /ipban chname P.S: List is updating when the game is starting. 1 Link to comment Share on other sites More sharing options...
Forum Moderator Raylee 658 Posted August 17, 2019 Forum Moderator Share Posted August 17, 2019 Nice release Thank you. Best regards Raylee 1 Link to comment Share on other sites More sharing options...
lucaluca 14 Posted April 16, 2021 Share Posted April 16, 2021 hey man how can i reload the 'BANIP' file ingame? 1 Link to comment Share on other sites More sharing options...
Contributor Veltor88 5183 Posted April 17, 2021 Contributor Share Posted April 17, 2021 5 hours ago, lucaluca said: hey man how can i reload the 'BANIP' file ingame? This is the hidden content, please Sign In or Sign Up 55 1 1 1 1 13 1 2 30 Link to comment Share on other sites More sharing options...
Active Member nazox 214 Posted January 8 Active Member Share Posted January 8 (edited) Hello @ Mali thanks for the system, and sorry to revive this, this is a little update to after use the command and the players are kicked, the account automaticaly have "BLOCK" on navicat Open ipban.cpp and replace function with: Spoiler #ifdef IP_BAN <--Change with your macro void do_ipban(LPCHARACTER ch, const char *argument, int cmd, int subcmd) { char arg1[256]; one_argument(argument, arg1, sizeof(arg1)); if (!*arg1) { ch->ChatPacket(CHAT_TYPE_INFO, "Uso: ipban <nombre>"); return; } std::unique_ptr<SQLMsg> checkAccountStatus(DBManager::instance().DirectQuery("SELECT status FROM account.account WHERE id = (SELECT account_id FROM player.player WHERE name = '%s')", arg1)); if (checkAccountStatus->Get()->uiNumRows) { const auto statusRow = mysql_fetch_row(checkAccountStatus->Get()->pSQLResult); const std::string accountStatus(statusRow[0]); if (accountStatus == "BLOCK") { ch->ChatPacket(CHAT_TYPE_INFO, "La cuenta de %s's esta actualmente baneada.", arg1); return; } else { std::unique_ptr<SQLMsg> blockAccount(DBManager::instance().DirectQuery("UPDATE account.account SET status = 'BLOCK' WHERE id = (SELECT account_id FROM player.player WHERE name = '%s')", arg1)); if (blockAccount->Get()->uiAffectedRows > 0) { ch->ChatPacket(CHAT_TYPE_INFO, "La cuenta de %s's ha sido baneada.", arg1); } else { ch->ChatPacket(CHAT_TYPE_INFO, "Error al bnear la cuenta de %s's .", arg1); return; } } } else { ch->ChatPacket(CHAT_TYPE_INFO, "No se encuentra al jugador %s", arg1); return; } LPDESC d = DESC_MANAGER::instance().FindByCharacterName(arg1); if (d && d->GetCharacter()) { if (ch == d->GetCharacter()) { ch->ChatPacket(CHAT_TYPE_INFO, "No puedes banearte a ti mismo."); return; } if (d->GetCharacter()->IsGM()) { ch->ChatPacket(CHAT_TYPE_INFO, "No puedes banear a un GameMaster."); return; } std::unique_ptr<SQLMsg> msg(DBManager::instance().DirectQuery("SELECT ip FROM player.player WHERE name = '%s'", d->GetCharacter()->GetName())); if (msg->Get()->uiNumRows) { const auto row = mysql_fetch_row(msg->Get()->pSQLResult); AddBanIP(row[0]); ch->ChatPacket(CHAT_TYPE_INFO, "El jugador %s ha sido baneado, con ip: %s", d->GetCharacter()->GetName(), row[0]); DESC_MANAGER::instance().DestroyDesc(d); // Desconectar al jugador inmediatamente } else { ch->ChatPacket(CHAT_TYPE_INFO, "Error al busca la IP %s", arg1); } } else { ch->ChatPacket(CHAT_TYPE_INFO, "No se encuentra %s", arg1); } } #endif It's a shame we have to restart to apply the changes, because until then you can continue connecting/creating accounts, I'm still looking into this, anyway, thank you very much, you always do an incredible job. Edited January 8 by Metin2 Dev International Core X - External 2 Internal Nicks: Nazox™ Krone™ Nagato™ Yahiko™ Yakiro™ Proyecto: Trabajando en el. Compañeros & firma: DreamHQ - 2009-2015 [Nostalgia] Link to comment Share on other sites More sharing options...
Recommended Posts