mirror of
https://github.com/kami-blue/client
synced 2024-12-21 22:50:13 +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:
parent
c854852ad6
commit
3db3b8a1cd
@ -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",
|
||||
@ -346,4 +363,4 @@ public class AntiSpam extends Module {
|
||||
"^To .+: ",
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user