2013-06-21 10:25:45 +02:00
|
|
|
From 8ca478a5293b028b7bbec22ffc24b4465661b5a2 Mon Sep 17 00:00:00 2001
|
2013-06-21 09:59:37 +02:00
|
|
|
From: md_5 <md_5@live.com.au>
|
|
|
|
Date: Fri, 21 Jun 2013 17:59:22 +1000
|
|
|
|
Subject: [PATCH] Spam Filter Exclusions
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
|
|
index 998ac8d..a292c1a 100644
|
|
|
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
|
|
@@ -846,7 +846,8 @@ public class PlayerConnection extends Connection {
|
|
|
|
this.chat(s, packet3chat.a_());
|
|
|
|
|
|
|
|
// This section stays because it is only applicable to packets
|
|
|
|
- if (chatSpamField.addAndGet(this, 20) > 200 && !this.minecraftServer.getPlayerList().isOp(this.player.name)) { // CraftBukkit use thread-safe spam
|
|
|
|
+ // Spigot - spam exclusions
|
|
|
|
+ if (!org.spigotmc.SpigotConfig.spamExclusions.contains(s) && chatSpamField.addAndGet(this, 20) > 200 && !this.minecraftServer.getPlayerList().isOp(this.player.name)) { // CraftBukkit use thread-safe spam
|
|
|
|
if (packet3chat.a_()) {
|
|
|
|
Waitable waitable = new Waitable() {
|
|
|
|
@Override
|
|
|
|
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
|
2013-06-21 10:25:45 +02:00
|
|
|
index d882808..3918325 100644
|
2013-06-21 09:59:37 +02:00
|
|
|
--- a/src/main/java/org/spigotmc/SpigotConfig.java
|
|
|
|
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
|
2013-06-21 10:25:45 +02:00
|
|
|
@@ -200,4 +200,13 @@ public class SpigotConfig
|
2013-06-21 09:59:37 +02:00
|
|
|
bungeeAddresses = getList( "settings.bungeecord-addresses", bungee );
|
|
|
|
bungee = getBoolean( "settings.bungeecord", true );
|
|
|
|
}
|
|
|
|
+
|
|
|
|
+ public static List<String> spamExclusions;
|
|
|
|
+ private void spamExclusions()
|
|
|
|
+ {
|
|
|
|
+ spamExclusions = getList( "commands.spam-exclusions", Arrays.asList( new String[]
|
|
|
|
+ {
|
|
|
|
+ "/skill"
|
|
|
|
+ } ) );
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
--
|
|
|
|
1.8.1.2
|
|
|
|
|