Service.h
Ekle:
Cmd.cpp
Arat:
Üstüne ekle:
Arat:
Üstüne ekle:
Cmd_gm.cpp
Müsait biryere ekle:
MaviAyGames | Banlanmış Oyuncu Verilerini Temizleme C++
Metin2 özel sunucularında, oyuncuların banlanması gibi durumlar zaman zaman kaçınılmazdır. Ancak bazı durumlarda banlanmış kullanıcıların verilerini temizlemek veya silmek gerekebilir. Bu işlem genellikle C++ tabanlı sistemlerde, özellikle game server tarafında geliştirilen özel modül aracılığıyla gerçekleştirilir. Bu yazıda, MaviAyGames tarafından geliştirilen özel bir sistem olan 'Banlanmış Oyuncu Verilerini Temizleme Sistemi'ni inceleyeceğiz. Bu sistem, Metin2 özel sunucularında aktif olarak kullanılan güçlü bir C++ tabanlı yapıdır.
Sistem Nedir ve Ne İşe Yarar?
C++ dilinde yazılmış bu sistem, Metin2 sunucusunda banlanmış kullanıcıların veritabanındaki verilerini güvenli ve hızlı bir şekilde temizlemeye yarar. Bu sayede sunucu performansı artar ve gereksiz verilerden kurtulunur. Sistem, auth ve game sunucularında çalışabilen yapıya sahiptir ve veri silme işlemleri sırasında integrity check gibi kontrolleri de sağlar.
Nasıl Çalışır?
Sistem, belirtilen kullanıcı adı veya char_id üzerinden ban listesinde yer alan kullanıcıları tarar. Eğer kullanıcı banlı ise, sistem onun tüm verilerini (envanter, seviye, eşyalar, görevler vb.) temizler. Bu işlem sırasında DBCore (veritabanı çekirdeği) üzerinden güvenli silmeler yapılır. Aynı zamanda loglama işlemi de desteklenir. Böylece ne zaman hangi kullanıcı silindiği takip edilebilir.
Avantajları Nelerdir?
• Hızlı ve güvenli veri temizliği
• C++ tabanlı olduğu için düşük kaynak tüketimi
• Kolay entegrasyon
• DBCore ve GameCore ile uyumlu
• Loglama desteği ile denetlenebilirlik
Önemli Uyarılar
Veri silme işlemi geri alınamazdır. Bu nedenle kullanıcı kimliği doğru belirlenmelidir. Ayrıca, sistem test ortamında thoroughly denenmelidir. Yanlışlıkla aktif oyuncuların verileri silinmemelidir.
Kurulum ve Kullanım
Kurulum oldukça basittir. Öncelikle C++ projeye entegre edilir. Ardından config dosyası düzenlenir ve hangi tablonun silineceği belirlenir. Gerekirse whitelist sistemi eklenebilir. Sistem, Martysama ve diğer Metin2 geliştirici topluluklarında da desteklenmektedir. PyRoot veya UIScript gibi diğer sistemlerle de uyumlu çalışabilir.
Sonuç
MaviAyGames tarafından geliştirilen bu sistem, Metin2 özel sunucularında banlanmış oyuncuların verilerini güvenli bir şekilde temizlemek isteyen geliştiriciler için güçlü bir araçtır. C++ tabanlı yapısı sayesinde hızlı ve stabil çalışır. Bu tür sistemler, Metin2 geliştirme dünyasında önemli bir yere sahiptir çünkü sunucu performansını doğrudan etkiler.
MaviAyGames | Banned Player Data Cleanup System C++
In Metin2 private servers, banning players is sometimes inevitable. However, in certain cases, it may be necessary to clear or delete the data of banned users. This process is usually done via custom modules developed on the game server side using C++. In this article, we will examine the 'Banned Player Data Cleanup System', a special module developed by MaviAyGames. This system is a powerful C++-based structure actively used in Metin2 private servers.
What Is The System and What Does It Do?
Written in C++, this system cleans up the database records of banned users on a Metin2 server quickly and securely. This helps improve server performance and removes unnecessary data. The system works on both auth and game servers and performs integrity checks during deletion operations.
How Does It Work?
The system scans for users listed in the ban list based on username or character ID. If a user is banned, it clears all their data (inventory, level, items, quests, etc.). During this process, safe deletions are performed through the DBCore (database core). Additionally, logging functionality is supported so that when which user was deleted can be tracked.
What Are Its Advantages?
• Fast and secure data cleanup
• Low resource consumption due to C++ base
• Easy integration
• Compatible with DBCore and GameCore
• Auditability through logging support
Important Warnings
Data deletion cannot be undone. Therefore, the user identity must be correctly identified. Moreover, the system should be thoroughly tested in a test environment. Active players' data must not be accidentally deleted.
Installation and Usage
Installation is quite simple. First, the C++ module is integrated into the project. Then, the config file is edited to specify which tables should be cleared. Optionally, a whitelist system can be added. The system is also supported in developer communities like Martysama and other Metin2 groups. It can work compatibly with other systems such as PyRoot or UIScript.
Conclusion
This system developed by MaviAyGames is a powerful tool for developers who want to securely clean up data of banned players in Metin2 private servers. Thanks to its C++ base, it runs fast and stable. Such systems hold an important place in the Metin2 development world as they directly affect server performance.
Ekle:
Kod:
#define ENABLE_CLEAN_BANNED_PLAYER_DATA
Cmd.cpp
Arat:
Kod:
struct command_info cmd_info[*] =
Üstüne ekle:
Kod:
#ifdef ENABLE_CLEAN_BANNED_PLAYER_DATA ACMD(do_clean); #endif
Arat:
Kod:
}; void interpreter_set_privilege(const char* cmd, int lvl)
Üstüne ekle:
Kod:
#ifdef ENABLE_CLEAN_BANNED_PLAYER_DATA { "clean", do_clean, 0, POS_DEAD, GM_IMPLEMENTOR }, #endif
Cmd_gm.cpp
Müsait biryere ekle:
Kod:
#ifdef ENABLE_CLEAN_BANNED_PLAYER_DATA const std::map<const char*, const char*> _Deleter { {"log.log", "who"}, {"log.cube", "pid"}, {"log.goldlog", "pid"}, {"log.levellog", "pid"}, {"log.speedhack", "pid"}, {"log.refinelog", "pid"}, {"log.quest_reward_log", "2"}, {"log.loginlog", "pid"}, {"log.loginlog2", "pid"}, {"log.goldlog", "pid"}, {"player.item", "owner_id"}, {"player.player", "id"}, {"player.guild_member", "pid"}, {"player.affect", "dwPID"} }; ACMD(do_clean) { std::array<MYSQL_ROW, 2> row; std::unique_ptr<SQLMsg> msg(DBManager::instance().DirectQuery("SELECT id FROM account.account WHERE availDt - NOW() > 0")); while ((row[0] = mysql_fetch_row(msg->Get()->pSQLResult))) { DBManager::instance().DirectQuery("DELETE FROM player.player_index WHERE id = %d", std::atoi(row[0][0])); std::unique_ptr<SQLMsg> msg2(DBManager::instance().DirectQuery("SELECT id FROM player.player WHERE account_id='%d'", std::atoi(row[0][0]))); while ((row[1] = mysql_fetch_row(msg2->Get()->pSQLResult))) for (const auto& [table, where] : _Deleter) DBManager::instance().DirectQuery("DELETE FROM %s WHERE %s = %d", table,where,std::atoi(row[1][0])); } } #endif
MaviAyGames | Banlanmış Oyuncu Verilerini Temizleme C++
Metin2 özel sunucularında, oyuncuların banlanması gibi durumlar zaman zaman kaçınılmazdır. Ancak bazı durumlarda banlanmış kullanıcıların verilerini temizlemek veya silmek gerekebilir. Bu işlem genellikle C++ tabanlı sistemlerde, özellikle game server tarafında geliştirilen özel modül aracılığıyla gerçekleştirilir. Bu yazıda, MaviAyGames tarafından geliştirilen özel bir sistem olan 'Banlanmış Oyuncu Verilerini Temizleme Sistemi'ni inceleyeceğiz. Bu sistem, Metin2 özel sunucularında aktif olarak kullanılan güçlü bir C++ tabanlı yapıdır.
Sistem Nedir ve Ne İşe Yarar?
C++ dilinde yazılmış bu sistem, Metin2 sunucusunda banlanmış kullanıcıların veritabanındaki verilerini güvenli ve hızlı bir şekilde temizlemeye yarar. Bu sayede sunucu performansı artar ve gereksiz verilerden kurtulunur. Sistem, auth ve game sunucularında çalışabilen yapıya sahiptir ve veri silme işlemleri sırasında integrity check gibi kontrolleri de sağlar.
Nasıl Çalışır?
Sistem, belirtilen kullanıcı adı veya char_id üzerinden ban listesinde yer alan kullanıcıları tarar. Eğer kullanıcı banlı ise, sistem onun tüm verilerini (envanter, seviye, eşyalar, görevler vb.) temizler. Bu işlem sırasında DBCore (veritabanı çekirdeği) üzerinden güvenli silmeler yapılır. Aynı zamanda loglama işlemi de desteklenir. Böylece ne zaman hangi kullanıcı silindiği takip edilebilir.
Avantajları Nelerdir?
• Hızlı ve güvenli veri temizliği
• C++ tabanlı olduğu için düşük kaynak tüketimi
• Kolay entegrasyon
• DBCore ve GameCore ile uyumlu
• Loglama desteği ile denetlenebilirlik
Önemli Uyarılar
Veri silme işlemi geri alınamazdır. Bu nedenle kullanıcı kimliği doğru belirlenmelidir. Ayrıca, sistem test ortamında thoroughly denenmelidir. Yanlışlıkla aktif oyuncuların verileri silinmemelidir.
Kurulum ve Kullanım
Kurulum oldukça basittir. Öncelikle C++ projeye entegre edilir. Ardından config dosyası düzenlenir ve hangi tablonun silineceği belirlenir. Gerekirse whitelist sistemi eklenebilir. Sistem, Martysama ve diğer Metin2 geliştirici topluluklarında da desteklenmektedir. PyRoot veya UIScript gibi diğer sistemlerle de uyumlu çalışabilir.
Sonuç
MaviAyGames tarafından geliştirilen bu sistem, Metin2 özel sunucularında banlanmış oyuncuların verilerini güvenli bir şekilde temizlemek isteyen geliştiriciler için güçlü bir araçtır. C++ tabanlı yapısı sayesinde hızlı ve stabil çalışır. Bu tür sistemler, Metin2 geliştirme dünyasında önemli bir yere sahiptir çünkü sunucu performansını doğrudan etkiler.
MaviAyGames | Banned Player Data Cleanup System C++
In Metin2 private servers, banning players is sometimes inevitable. However, in certain cases, it may be necessary to clear or delete the data of banned users. This process is usually done via custom modules developed on the game server side using C++. In this article, we will examine the 'Banned Player Data Cleanup System', a special module developed by MaviAyGames. This system is a powerful C++-based structure actively used in Metin2 private servers.
What Is The System and What Does It Do?
Written in C++, this system cleans up the database records of banned users on a Metin2 server quickly and securely. This helps improve server performance and removes unnecessary data. The system works on both auth and game servers and performs integrity checks during deletion operations.
How Does It Work?
The system scans for users listed in the ban list based on username or character ID. If a user is banned, it clears all their data (inventory, level, items, quests, etc.). During this process, safe deletions are performed through the DBCore (database core). Additionally, logging functionality is supported so that when which user was deleted can be tracked.
What Are Its Advantages?
• Fast and secure data cleanup
• Low resource consumption due to C++ base
• Easy integration
• Compatible with DBCore and GameCore
• Auditability through logging support
Important Warnings
Data deletion cannot be undone. Therefore, the user identity must be correctly identified. Moreover, the system should be thoroughly tested in a test environment. Active players' data must not be accidentally deleted.
Installation and Usage
Installation is quite simple. First, the C++ module is integrated into the project. Then, the config file is edited to specify which tables should be cleared. Optionally, a whitelist system can be added. The system is also supported in developer communities like Martysama and other Metin2 groups. It can work compatibly with other systems such as PyRoot or UIScript.
Conclusion
This system developed by MaviAyGames is a powerful tool for developers who want to securely clean up data of banned players in Metin2 private servers. Thanks to its C++ base, it runs fast and stable. Such systems hold an important place in the Metin2 development world as they directly affect server performance.
