Merge pull request #109 from WiserTixx/allow-patreon-link

Add BeamMP patreon to the allowed links
This commit is contained in:
Deer McDurr 2024-09-07 20:53:40 +02:00 committed by GitHub
commit 7481ba4539
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -68,7 +68,7 @@ void StartSync(const 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))"); std::regex link_pattern(R"(https:\/\/(?:\w+)?(?:\.)?(?:beammp\.com|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;
} }