Fix Trolls Players Names [C++]

  • Konbuyu başlatan Konbuyu başlatan Admin
  • Başlangıç tarihi Başlangıç tarihi
  • Cevaplar Cevaplar 0
  • Görüntüleme Görüntüleme 34

Admin

Metin2Lobby
Yönetici
Founder
Katılım
6 Mayıs 2022
Mesajlar
52,647
Ticaret : 1 / 0 / 0
Recently the Alvedia server took off, where a lot of trolls and toxic players appeared, so today we will fix the names of the Characters and make a total blacklist of words such as:

const char* grzybOvh[*] = {
"gamemaster",
"gm",
"admin",
"moderator",
"tut",
"help",
};

letters are not case sensitive and the words must also not be used in the middle, that is, no one will make a name like GM2 or 1Admin1

Open input_login.cpp
Kod:
Find: void CInputLogin::CharacterCreate(LPDESC d, const char * data) add in this function: #ifdef fix_trolls_players_name     const char* grzybOvh[*] = {         "gamemaster",         "gm",         "admin",         "moderator",         "tut",         "help",     };          std::string nameToLower(pinfo->name);     std::transform(nameToLower.begin(), nameToLower.end(), nameToLower.begin(), ::tolower);          for (const char* jebacTrollibyMuchomor : grzybOvh)     {         if (nameToLower.find(jebacTrollibyMuchomor) != std::string::npos)         {             TPacketGCLoginFailure packFailure;             memset(&packFailure, 0, sizeof(packFailure));             packFailure.header = HEADER_GC_CHARACTER_CREATE_FAILURE;             d->Packet(&packFailure, sizeof(packFailure));             return;         }     } #endif service.h or CommonDefines.h #define fix_trolls_players_name

Fix Trolls Players Names [C++] ile Metin2 Sunucularında Kötüye Kullanımı Önleme


Metin2 özel sunucularında oyun deneyimini bozan ve topluluk içinde gerilim yaratan unsurlardan birisi de troll oyuncu isimleridir. Bu tür isimler hem diğer oyuncuların duygusal durumlarını etkileyebilir hem de sunucu yöneticileri için ciddi bir yönetim sorunudur. Bu nedenle, Troll isimleri engellemek ve oyuncu deneyimini korumak adına C++ tabanlı bir sistem geliştirmek büyük önem taşır. Bu yazıda, Metin2 özel sunucularında troll oyuncu isimlerini nasıl engelleyebileceğinizi ve bu sistemi C++ dilinde nasıl entegre edebileceğinizi detaylıca ele alacağız.

Troll Oyuncu İsimleri Nedir?
Troll isimler, genellikle kaba, küfürlü, saldırgan veya diğer oyuncuları rahatsız edecek şekilde tasarlanmış kullanıcı adlarıdır. Bu isimler; ırkçılık, küfür, politik ifadeler veya siber zorbalık içerdiği için oyun içi sosyal yapıyı bozar. Özellikle Metin2 PvP sistemlerinde, oyuncular birbirleriyle rekabet içinde oldukları için bu tür isimler daha da dikkat çekici olabilir ve toplulukta bölünmelere neden olabilir.

Neden Fix Trolls Players Names Sistemi Gerekli?
Sunucularınızda troll isimlere izin vermek, hem oyun içi barışı hem de sunucu imajınızı riske atar. Bu tür isimleri manuel olarak takip etmek ve düzenlemek zaman alıcıdır. Ancak C++ ile geliştirilen otomatik filtreleme sistemleri, oyuncu kayıt sırasında isimleri kontrol ederek, belirlenen kelimeleri veya desenleri tespit edip isim oluşturmaya izin vermeyebilir. Bu sayede, hem güvenlik hem de deneyim kalitesi artırılır.

Fix Trolls Players Names Sistemi Nasıl Çalışır?
Sistem genellikle iki ana bileşenden oluşur:

1. Yasaklı Kelime Listesi: Belirli kelimelerin veya desenlerin bulunduğu bir veri seti. Örneğin 'admin', 'mod', 'küfür1', 'ırkçıifade' gibi. Bu liste dinamik olarak güncellenebilir.

2. Doğrulama Fonksiyonu: Oyuncu bir isim girdiğinde, bu ismin listedeki yasaklı kelimelerle eşleşip eşleşmediğini kontrol eder. Eğer eşleşme varsa, isim kabul edilmez ve kullanıcıya uyarı mesajı gönderilir.

C++ Kod Örneği
Aşağıda basitleştirilmiş bir C++ doğrulama fonksiyonu örneği yer almaktadır:

Kod:
bool IsNameValid(const std::string& name) {[BR][/BR]    std::vector<std::string> bannedWords = {"troll", "admin", "mod", "küfür"};[BR][/BR][BR][/BR]    for (const auto& word : bannedWords) {[BR][/BR]        if (name.find(word) != std::string::npos) {[BR][/BR]            return false; // Yasaklı kelime bulundu[BR][/BR]        }[BR][/BR]    }[BR][/BR]    return true;[BR][/BR]}

Entegrasyon Adımları[/BR]1. Kodun Derlenmesi: Mevcut Metin2 sunucu kaynak koduna entegre edilmeli. Genellikle auth_server veya game_server üzerinde çalıştırılır.

2. Veritabanı Bağlantısı: Yasaklı kelimeler DB üzerinden yönetilebilir. Böylece sunucu çalışan bir sistem üzerinde bile kelime listesi kolayca güncellenebilir.

3. Oyun İçinde Geri Bildirim: Oyuncuya ismi kabul edilmediyse net bir hata mesajı gösterilmelidir. Örneğin: 'Lütfen daha uygun bir isim seçin.'

Faydaları Nelerdir?
Fix Trolls Players Names sistemi sayesinde:
- Oyuncu topluluğu daha sağlıklı bir ortamda oynayabilir.
- Yöneticilerin manuel müdahale ihtiyacı azalır.
- Sunucu imajı korunur ve daha profesyonel bir algı oluşur.
- PvP sistemlerinde isimlerin etkisi dolaylı olarak azaltılır.

Sonuç
Metin2 özel sunucularında oyuncu isimlerini korumak, hem teknik hem de sosyal açıdan önemli bir adımdır. C++ dilinde yazılmış bu tür filtreleme sistemleri, sunucu sahiplerine esneklik ve kontrol sağlar. Metin2Lobby.com olarak, sunucu geliştirme konusunda bilgi ve kaynak paylaşmaya devam ediyoruz. Bu sistem gibi birçok kaynak kod ve script paylaşımını sitemizde bulabilirsiniz.


Fix Trolls Players Names [C++] - Preventing Abuse on Metin2 Servers


One of the factors that can disrupt the gaming experience in Metin2 private servers are troll player names. Such names can affect the emotional state of other players and create serious management challenges for server administrators. Therefore, blocking troll names and preserving the gaming experience requires implementing an automated filtering system using C++. In this article, we will discuss how you can prevent troll player names in Metin2 private servers and integrate this system using C++.

What Are Troll Player Names?
Troll names usually consist of offensive, vulgar, aggressive, or disturbing usernames. These names may include racism, profanity, political statements, or cyberbullying, which corrupts the social structure within the game. Especially in Metin2 PvP systems, where players compete against each other, such names become more noticeable and can cause division within the community.

Why Do You Need a Fix Trolls Players Names System?
Allowing troll names on your server risks both in-game peace and the server's reputation. Tracking and editing these names manually is time-consuming. However, automated filtering systems developed with C++ can check player names upon registration and block names containing blacklisted words or patterns. This improves both security and experience quality.

How Does the Fix Trolls Players Names System Work?
The system generally consists of two main components:

1. Blacklist Words: A dataset containing specific words or patterns like 'admin', 'mod', 'profanity', 'racistterm'. This list can be updated dynamically.

2. Validation Function: When a player enters a name, it checks whether the name matches any blacklisted words. If a match occurs, the name is rejected and an error message is sent to the user.

C++ Code Example
Here is a simplified C++ validation function example:

Kod:
bool IsNameValid(const std::string& name) {[BR][/BR]    std::vector<std::string> bannedWords = {"troll", "admin", "mod", "profanity"};[BR][/BR][BR][/BR]    for (const auto& word : bannedWords) {[BR][/BR]        if (name.find(word) != std::string::npos) {[BR][/BR]            return false; // Banned word found[BR][/BR]        }[BR][/BR]    }[BR][/BR]    return true;[BR][/BR]}

Integration Steps[/BR]1. Compiling the Code: It should be integrated into the existing Metin2 server source code, typically running on auth_server or game_server.

2. Database Connection: Blacklisted words can be managed via database. This allows easy updates even while the server is running.

3. In-Game Feedback: The player should receive a clear error message if their name is rejected. For example: 'Please choose a more appropriate name.'

Benefits
Thanks to the Fix Trolls Players Names system:
- Players can enjoy a healthier gaming environment.
- Reduces manual intervention by administrators.
- Preserves server image and creates a more professional perception.
- Indirectly reduces the impact of names in PvP systems.

Conclusion
Protecting player names in Metin2 private servers is important both technically and socially. Filtering systems written in C++ provide flexibility and control to server owners. At Metin2Lobby.com, we continue sharing information and resources about server development. You can find many such source codes and scripts on our website.
 

Şuan Bu Konuyu Görüntüleyen Kullanıcılar (Toplam : 0, Üye : 0, Misafir : 0)

Benzer konular

Geri
Üst Alt