Add beammp.gg to the list of allowed links

This commit is contained in:
Tixx 2024-11-02 22:18:46 +01:00
parent 54895eb1b0
commit 8519e279a7

View File

@ -104,7 +104,7 @@ void CoreSend(std::string data) {
} }
bool IsAllowedLink(const std::string& Link) { bool IsAllowedLink(const std::string& Link) {
std::regex link_pattern(R"(https:\/\/(?:\w+)?(?:\.)?(?:beammp\.com|discord\.gg|patreon\.com\/BeamMP))"); std::regex link_pattern(R"(https:\/\/(?:\w+)?(?:\.)?(?:beammp\.com|beammp\.gg|discord\.gg|patreon\.com\/BeamMP))");
std::smatch link_match; std::smatch link_match;
return std::regex_search(Link, link_match, link_pattern) && link_match.position() == 0; return std::regex_search(Link, link_match, link_pattern) && link_match.position() == 0;
} }