Skip to content

Commit

Permalink
Merge pull request #25 from Commandserver/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
Commandserver authored Jul 1, 2022
2 parents 7147c09 + 07b8576 commit 451d0b6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
4 changes: 4 additions & 0 deletions domain-blacklist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -637,6 +637,7 @@ plumcafebistro.com
pnrtscr.com
pokerqq99.net
pombest.com
pornhub.com
pornoxvideo.co
postimage.co
potsarmoires.top
Expand Down Expand Up @@ -707,6 +708,7 @@ ru.com
runikeipajpsales.party
russianporn.tv
rust-tve.com
rustroulettes.com
saadilent.ir
safeemergency.com
salixnebac.club
Expand Down Expand Up @@ -851,6 +853,7 @@ techbar.me
techcityconnect.ltd
technologypickup.us
teknist.xyz
telegra.ph
tentcity4.info
thadinnoo.co
thebubbleprocess.com
Expand All @@ -865,6 +868,7 @@ timberyart.gr
timgorichanaz.com
tiny.cc
tipobet00938.com
tits-guru.com
tizkarvpn76.biz
tldr.ly
tnfbc.cn
Expand Down
14 changes: 7 additions & 7 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ int main() {
dpp::embed embed;
embed.set_color(0xff0000);
embed.set_timestamp(first_join);
embed.set_title(fmt::format(":o: Raid detected with {} Users @everyone", fast_joined_members.count()));
embed.set_title(fmt::format(":o: Raid detected with {} Users", fast_joined_members.count()));
dpp::guild_member *firstUser;
dpp::guild_member *lastUser;
std::string memberStr;
Expand All @@ -204,7 +204,7 @@ int main() {
embed.add_field("First user", fmt::format("User: {}\nJoined: {}\n\u200b", firstUser->get_mention(), dpp::utility::timestamp(firstUser->joined_at, dpp::utility::tf_long_time)), true);
embed.add_field("Last user", fmt::format("User: {}\nJoined: {}\n\u200b", lastUser->get_mention(), dpp::utility::timestamp(lastUser->joined_at, dpp::utility::tf_long_time)), true);
embed.set_description(memberStr);
dpp::message msg;
dpp::message msg("@everyone");
msg.allowed_mentions.parse_everyone = true;
msg.channel_id = config["log-channel-id"];
msg.add_embed(embed);
Expand Down Expand Up @@ -258,10 +258,10 @@ int main() {
}
}

/* when more than 12 members joined in the past 60 seconds
* you can adjust this number depending on your guild-size. I think 12 should be enough
/* when more than 10 members joined in the past 60 seconds
* you can adjust this number depending on your guild-size. I think 10 should be enough
*/
if (fast_joined_member_count >= 12) {
if (fast_joined_member_count >= 10) {
if (!first_join) {
first_join = time(nullptr);
}
Expand Down Expand Up @@ -435,7 +435,7 @@ int main() {
dpp::embed embed; // create the embed log message
embed.set_color(0xefa226);
embed.set_timestamp(time(nullptr));
embed.set_description(":warning: Spam detected by " + event.msg.author.get_mention());
embed.set_description(fmt::format(":warning: Spam detected by {} ({})", event.msg.author.get_mention(), event.msg.author.format_username()));
embed.add_field("Reason", reason, true);
embed.add_field("Channel", fmt::format("<#{}>", event.msg.channel_id), true);
if (!event.msg.content.empty()) {
Expand Down Expand Up @@ -583,7 +583,7 @@ int main() {
}

// too many mentions
if (event.msg.mentions.size() > 8) {
if (event.msg.mentions.size() > 6) {
log->debug("too many mentions in one message");
mitigateSpam("Mass ping", DAY * 14, false);
return;
Expand Down

0 comments on commit 451d0b6

Please sign in to comment.