mirror of https://notabug.org/acetone/ircabot.git
Защита от точки в поисковом запросе (ибо срабатывает, как регулярка)
parent
5e9efcf941
commit
1a0b25796a
3
main.cpp
3
main.cpp
|
@ -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);
|
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"]);
|
tsc->write_to_channel(tsc->get_msg_nick() + ", " + conf["error"]);
|
||||||
}
|
}
|
||||||
else if (msg.find(' ') == std::string::npos) {
|
else if (msg.find(' ') == std::string::npos) {
|
||||||
|
|
Loading…
Reference in New Issue