1
0
mirror of https://github.com/kami-blue/client synced 2024-12-22 07:01:01 +00:00

Add hypixel to antispam lol (#489)

* hypixel shills

* lol

Co-authored-by: aUniqueUser <55301516+aUniqueUser@users.noreply.github.com>
This commit is contained in:
Bella Who 2020-02-26 14:03:00 +00:00 committed by GitHub
parent c854852ad6
commit 3db3b8a1cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,6 +17,7 @@ import java.util.stream.Collectors;
* Created 19 November 2019 by hub
* Updated 12 January 2020 by hub
* Updated by S-B99 on 18/01/20
* Updated 19 February 2020 by aUniqueUser
*/
@Module.Info(name = "AntiSpam", category = Module.Category.CHAT, description = "Removes spam and advertising from the chat", showOnArray = Module.ShowOnArray.OFF)
public class AntiSpam extends Module {
@ -28,6 +29,7 @@ public class AntiSpam extends Module {
private Setting<Boolean> spammers = register(Settings.b("Spammers", true));
private Setting<Boolean> insulters = register(Settings.b("Insulters", true));
private Setting<Boolean> greeters = register(Settings.b("Greeters", true));
private Setting<Boolean> hypixelShills = register(Settings.b("Hypixel Shills", true));
private Setting<Boolean> tradeChat = register(Settings.b("Trade Chat", true));
private Setting<Boolean> ips = register(Settings.b("Server Ips", true));
private Setting<Boolean> ipsAgr = register(Settings.b("Ips Aggressive", false));
@ -151,6 +153,13 @@ public class AntiSpam extends Module {
return true;
}
if (hypixelShills.getValue() && findPatterns(FilterPatterns.HYPIXEL_SHILLS, message)) {
if (showBlocked.getValue()) {
Command.sendChatMessage("[AntiSpam] Hypixel Shills: ");
}
return true;
}
if (duplicates.getValue()) {
if (messageHistory == null) {
messageHistory = new ConcurrentHashMap<>();
@ -296,6 +305,14 @@ public class AntiSpam extends Module {
// incomplete
};
private static final String[] HYPIXEL_SHILLS =
{
"/p join",
"/party join",
"road to",
"private games"
};
private static final String[] DISCORD =
{
"discord.gg",