Update others.cpp
This commit is contained in:
parent
c516de51e5
commit
34a2e3afe3
@ -697,11 +697,13 @@ bool DispatchUserMessage_hook(void *_this, int type, bf_read &buf)
|
||||
if (!strcmp(chat_filter.GetString(), ""))
|
||||
{
|
||||
std::string tmp = {};
|
||||
std::string tmp2 = {};
|
||||
int iii = 0;
|
||||
player_info_s info;
|
||||
g_IEngine->GetPlayerInfo(LOCAL_E->m_IDX, &info);
|
||||
std::string name1 = info.name;
|
||||
std::vector<std::string> name2{};
|
||||
std::vector<std::string> name3{};
|
||||
std::string claz = {};
|
||||
switch (g_pLocalPlayer->clazz)
|
||||
{
|
||||
@ -750,8 +752,26 @@ bool DispatchUserMessage_hook(void *_this, int type, bf_read &buf)
|
||||
tmp += i;
|
||||
}
|
||||
}
|
||||
iii = 0;
|
||||
for (char i : name1)
|
||||
{
|
||||
if (iii == 3)
|
||||
{
|
||||
iii = 0;
|
||||
tmp += i;
|
||||
name3.push_back(tmp2);
|
||||
tmp2 = "";
|
||||
}
|
||||
else if (iii < 3)
|
||||
{
|
||||
iii++;
|
||||
tmp2 += i;
|
||||
}
|
||||
}
|
||||
if (tmp.size() > 2)
|
||||
name2.push_back(tmp);
|
||||
if (tmp2.size() > 2)
|
||||
name3.push_back(tmp2);
|
||||
iii = 0;
|
||||
std::vector<std::string> res = {
|
||||
"skid", "script", "cheat", "hak", "hac", "f1",
|
||||
@ -763,6 +783,11 @@ bool DispatchUserMessage_hook(void *_this, int type, bf_read &buf)
|
||||
boost::to_lower(i);
|
||||
res.push_back(i);
|
||||
}
|
||||
for (auto i : name3)
|
||||
{
|
||||
boost::to_lower(i);
|
||||
res.push_back(i);
|
||||
}
|
||||
std::string message2 = message;
|
||||
boost::to_lower(message2);
|
||||
boost::replace_all(message2, "4", "a");
|
||||
|
Reference in New Issue
Block a user