#pragma once #include "file_manager/file.hpp" #include "services/players/player_service.hpp" namespace { static const char* spam_texts[] = { "qq",//a chinese chat app "QQ", "WWW.", "www.", ".cn", ".CN", ".TOP", ".COM", ".top", "\xE3\x80\x90",//left bracket in Chinese input method "/Menu", "Money/", "Money\\\\", "Money\\", ".gg", "--->", "shopgta5", "doit#", "krutka#", "", // causes false positives for people typing in cyrillic // "\xD0\xBC\xD0\xB5", // Cyrillic "me" "P888", "gtacash", "\xE6\x89\xA3\xE6\x89\xA3",// no clue what this is "\xE5\xBE\xAE\xE4\xBF\xA1",// "wechat" in Chinese ".cc", "get_project_file(is_spam ? "./spam.log" : "./chat.log").get_path(), std::ios::app); auto& plData = *player->get_net_data(); auto ip = player->get_ip_address(); spam_log << player->get_name() << " (" << plData.m_gamer_handle.m_rockstar_id << ") <" << (int)ip.m_field1 << "." << (int)ip.m_field2 << "." << (int)ip.m_field3 << "." << (int)ip.m_field4 << ">: " << msg << std::endl; spam_log.close(); } }