diff --git a/resources/changelog.txt b/resources/changelog.txt index 1e9178e..88406a5 100644 --- a/resources/changelog.txt +++ b/resources/changelog.txt @@ -276,4 +276,7 @@ v0.63: - You do not have to set a spam_time for each channel, only the ones you want limited. - setting spam_time: '0.5' in your general channel will make the global channel behave as normal. - default channels.yml has spam_time: '0.5' set for general, town, nation and alliance channels; remaining channels have no spam_time set. - - in your chatconfig.yml you can remove the "spam_time: '0.5'" line before or after updating. \ No newline at end of file + - in your chatconfig.yml you can remove the "spam_time: '0.5'" line before or after updating. + - New Permission Node: townychat.spam.bypass + - Defaults to ops. + - Bypasses spam check. \ No newline at end of file diff --git a/resources/plugin.yml b/resources/plugin.yml index ef40a81..8b0585b 100644 --- a/resources/plugin.yml +++ b/resources/plugin.yml @@ -53,4 +53,7 @@ permissions: townychat.chat.format.strike: true townychat.chat.format.reset: description: Allows the use of &r to reset chat formatting. - default: true \ No newline at end of file + default: true + townychat.spam.bypass: + description: Keeps a player from getting stopped by spam checks. + default: op \ No newline at end of file diff --git a/src/com/palmergames/bukkit/TownyChat/channels/Channel.java b/src/com/palmergames/bukkit/TownyChat/channels/Channel.java index 101c2d2..f81d5e1 100644 --- a/src/com/palmergames/bukkit/TownyChat/channels/Channel.java +++ b/src/com/palmergames/bukkit/TownyChat/channels/Channel.java @@ -254,7 +254,8 @@ public abstract class Channel { * @return */ public boolean isSpam(Player player) { - + if (!player.hasPermission("townychat.spam.bypass")) + return false; long timeNow = System.currentTimeMillis(); long spam = timeNow;