Add fine info to spam check

This commit is contained in:
gravitylow committed 2014-01-20 15:45:03 -05:00
1 parent 14aa2a8905
commit b735a37663
4 files changed
+12 -4

No files matched your search

@@ -766,8 +766,10 @@ public class Backend {
break;
} else {
if (manager.getConfiguration().getConfig().blockChatSpamRepetition.getValue() && m.equalsIgnoreCase(msg) && i == 1) {
manager.getLoggingManager().logFineInfo(player.getName() + " spam-repeated \"" + msg + "\"");
return new CheckResult(CheckResult.Result.FAILED, lang.spamWarning.getValue());
} else if (manager.getConfiguration().getConfig().blockChatSpamSpeed.getValue() && System.currentTimeMillis() - user.getLastCommandTime() < magic.COMMAND_MIN * 2) {
manager.getLoggingManager().logFineInfo(player.getName() + " spammed quickly \"" + msg + "\"");
return new CheckResult(CheckResult.Result.FAILED, lang.spamWarning.getValue());
}
}