Защита от точки в поисковом запросе (ибо срабатывает, как регулярка)

master
const an teen 2021-05-28 09:23:49 +03:00
parent 5e9efcf941
commit 1a0b25796a
1 changed files with 2 additions and 1 deletions

View File

@ -280,7 +280,8 @@ void handler()
{
std::regex date_check(conf["find"] + " [0-9]{4}.[0-9]{2}.[0-9]{2}.*", std::regex_constants::egrep);
if (msg.find('*') != std::string::npos) { // Защита от хитрой регулярки
if (msg.find('*') != std::string::npos || msg.find('.') != std::string::npos) {
// Защита от хитрой регулярки
tsc->write_to_channel(tsc->get_msg_nick() + ", " + conf["error"]);
}
else if (msg.find(' ') == std::string::npos) {