Improved repeat message spam blocker.
This commit is contained in:
parent
2fbbfcb9e8
commit
ce5e8488da
|
|
@ -326,6 +326,10 @@ class PlayerEventHandler implements Listener
|
|||
playerData.spamCount++;
|
||||
}
|
||||
|
||||
//in any case, record the timestamp of this message and also its content for next time
|
||||
playerData.lastMessageTimestamp = new Date();
|
||||
playerData.lastMessage = message;
|
||||
|
||||
//if the message was determined to be a spam, consider taking action
|
||||
if(spam)
|
||||
{
|
||||
|
|
@ -388,10 +392,6 @@ class PlayerEventHandler implements Listener
|
|||
playerData.spamWarned = false;
|
||||
}
|
||||
|
||||
//in any case, record the timestamp of this message and also its content for next time
|
||||
playerData.lastMessageTimestamp = new Date();
|
||||
playerData.lastMessage = message;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user