Add new spam words (#3204)
Some checks are pending
Nightly Build / Build Nightly (push) Waiting to run
Nightly Build / Recreate Release (push) Blocked by required conditions
Nightly Build / Check Recent Commit (push) Successful in 42s

This commit is contained in:
Ryan 2024-06-02 13:11:40 -04:00 committed by GitHub
parent 58972289b1
commit 4adcc05cf3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,19 +1,19 @@
#pragma once
#include "file_manager/file.hpp"
#include "services/players/player_service.hpp"
#include "core/enums.hpp"
#include "packet.hpp"
#include "natives.hpp"
#include "script.hpp"
#include "fiber_pool.hpp"
#include "core/scr_globals.hpp"
#include "fiber_pool.hpp"
#include "file_manager/file.hpp"
#include "natives.hpp"
#include "packet.hpp"
#include "script.hpp"
#include "services/players/player_service.hpp"
#include <network/CNetGamePlayer.hpp>
#include <script/HudColor.hpp>
#include <network/ChatData.hpp>
#include <script/HudColor.hpp>
#include <script/globals/GPBD_FM_3.hpp>
namespace
{
static void gamer_handle_serialize(rage::rlGamerHandle& hnd, rage::datBitBuffer& buf)
@ -26,24 +26,18 @@ namespace
}
}
static const char* spam_texts[] =
{
static const char* spam_texts[] = {
"qq", //a chinese chat app
"QQ",
"WWW.",
"www.",
".cn",
".CN",
".cc",
".CC",
".TOP",
".COM",
".com",
".top",
"\xE3\x80\x90", //left bracket in Chinese input method
"/Menu",
"Money/",
"Money\\\\",
"Money\\",
"/menu",
"money/",
"money\\\\",
"money\\",
".gg",
"--->",
"shopgta5",
@ -56,23 +50,25 @@ namespace
"<font s",
"sellix.io",
"ezcars",
"PLANO INICIAL", // "initial plan"
"REP +",
"20R$", // Brazil currency?
"plano inicial", // "initial plan"
"rep +",
"20r$", // Brazil currency?
"l55.me",
"TRUSTPILOT",
"trustpilot",
"cashlounge",
"Fast Delivery",
"fast delivery",
"yosativa",
"rich2day",
"LevelLifters",
"levellifters",
". com",
"$1,000,000,000",
"Instant Delivery",
"0 Ban Risk",
"Discord For Cheap Money",
"instant delivery",
"0 ban risk",
"discord for cheap money",
"10-30m",
"Discord todo",
"hey guys! tired of being poor?",
"gta cash",
"discord todo",
"\xE6\x89\xA3\xE6\x89\xA3", // QQ
"\xE4\xBC\xA0\xE5\xAA\x92", // AV
"\xE8\x96\x87\xE4\xBF\xA1", // Wechat
@ -116,6 +112,7 @@ namespace
"\xE5\x81\xB7\xE6\x8B\x8D", // AV
"\xE4\xBC\xA0\xE7\x85\xA4", // AV
"\xE4\xB9\xB1\xE8\xAE\xBA", // AV
"\xE6\x83\x85\xE8\x89\xB2", // Erotic
};
}
@ -143,9 +140,12 @@ namespace big::chat
}
}
for (auto e : spam_texts)
if (strstr(text, e) != 0)
{
std::string e_str(e);
std::transform(e_str.begin(), e_str.end(), e_str.begin(), ::tolower);
if (strstr(text, e_str.c_str()) != 0)
return SpamReason::STATIC_DETECTION;
}
return SpamReason::NOT_A_SPAMMER;
}