Fixed overzealous CAPS and similar message filters.

This commit is contained in:
ryanhamshire 2014-12-23 10:11:44 -08:00
parent e1a02d2ee7
commit f0deef80aa

View File

@ -373,16 +373,18 @@ class PlayerEventHandler implements Listener
//compare forward
int identicalCount = 0;
for(int i = 0; i < shorterString.length(); i++)
int i;
for(i = 0; i < shorterString.length(); i++)
{
if(shorterString.charAt(i) == longerString.charAt(i)) identicalCount++;
if(identicalCount > maxIdenticalCharacters) return true;
}
//compare backward
for(int i = 0; i < shorterString.length(); i++)
int j;
for(j = 0; j < shorterString.length() - i; j++)
{
if(shorterString.charAt(shorterString.length() - i - 1) == longerString.charAt(longerString.length() - i - 1)) identicalCount++;
if(shorterString.charAt(shorterString.length() - j - 1) == longerString.charAt(longerString.length() - j - 1)) identicalCount++;
if(identicalCount > maxIdenticalCharacters) return true;
}