mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2024-12-22 20:17:24 +08:00
fix(Chat Filter): also lowercase incoming text (#3225)
This commit is contained in:
parent
6110db55fc
commit
2dbb931dea
@ -143,7 +143,9 @@ namespace big::chat
|
||||
{
|
||||
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)
|
||||
std::string text_str(text);
|
||||
std::transform(text_str.begin(), text_str.end(), text_str.begin(), ::tolower);
|
||||
if (strstr(text_str.c_str(), e_str.c_str()) != 0)
|
||||
return SpamReason::STATIC_DETECTION;
|
||||
}
|
||||
return SpamReason::NOT_A_SPAMMER;
|
||||
|
Loading…
Reference in New Issue
Block a user