Spam filter tolerance adjustment for similar msgs.
This commit is contained in:
parent
b86fded1db
commit
25e28c482a
|
|
@ -234,8 +234,8 @@ class PlayerEventHandler implements Listener
|
|||
spam = true;
|
||||
}
|
||||
|
||||
//if it's very similar to the last message
|
||||
if(!muted && this.stringsAreSimilar(message, playerData.lastMessage))
|
||||
//if it's very similar to the last message from the same player and within 10 seconds of that message
|
||||
if(!muted && this.stringsAreSimilar(message, playerData.lastMessage) && now - playerData.lastMessageTimestamp.getTime() < 10000)
|
||||
{
|
||||
playerData.spamCount++;
|
||||
spam = true;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user