RegisterAdminCommand - fix wrong message key

This commit is contained in:
ljacqu 2015-12-05 12:08:09 +01:00
parent 9d39fc1127
commit a8b3fe2648

View File

@ -43,8 +43,12 @@ public class RegisterAdminCommand extends ExecutableCommand {
final String playerPassLowerCase = playerPass.toLowerCase();
// Command logic
if (playerPassLowerCase.contains("delete") || playerPassLowerCase.contains("where") || playerPassLowerCase.contains("insert") || playerPassLowerCase.contains("modify") || playerPassLowerCase.contains("from") || playerPassLowerCase.contains("select") || playerPassLowerCase.contains(";") || playerPassLowerCase.contains("null") || !playerPassLowerCase.matches(Settings.getPassRegex)) {
m.send(sender, MessageKey.PASSWORD_IS_USERNAME_ERROR);
if (playerPassLowerCase.contains("delete") || playerPassLowerCase.contains("where")
|| playerPassLowerCase.contains("insert") || playerPassLowerCase.contains("modify")
|| playerPassLowerCase.contains("from") || playerPassLowerCase.contains("select")
|| playerPassLowerCase.contains(";") || playerPassLowerCase.contains("null")
|| !playerPassLowerCase.matches(Settings.getPassRegex)) {
m.send(sender, MessageKey.PASSWORD_MATCH_ERROR);
return true;
}
if (playerPassLowerCase.equalsIgnoreCase(playerName)) {