diff --git a/src/main/java/fr/xephi/authme/commands/ChangePasswordCommand.java b/src/main/java/fr/xephi/authme/commands/ChangePasswordCommand.java index 921e7001f..0e81523e3 100644 --- a/src/main/java/fr/xephi/authme/commands/ChangePasswordCommand.java +++ b/src/main/java/fr/xephi/authme/commands/ChangePasswordCommand.java @@ -54,17 +54,21 @@ public class ChangePasswordCommand implements CommandExecutor { } String lowpass = args[1].toLowerCase(); - if ((lowpass.contains("delete") || lowpass.contains("where") || lowpass.contains("insert") || lowpass.contains("modify") || lowpass.contains("from") || lowpass.contains("select") || lowpass.contains(";") || lowpass.contains("null")) || !lowpass.matches(Settings.getPassRegex) || lowpass.equalsIgnoreCase(name)) { + if ((lowpass.contains("delete") || lowpass.contains("where") || lowpass.contains("insert") || lowpass.contains("modify") || lowpass.contains("from") || lowpass.contains("select") || lowpass.contains(";") || lowpass.contains("null")) || !lowpass.matches(Settings.getPassRegex) { m.send(player, "password_error"); return true; } + if ((lowpass.equalsIgnoreCase(name){ + m.send(player, "password_error_nick"); + return true; + } if (lowpass.length() < Settings.getPasswordMinLen || lowpass.length() > Settings.passwordMaxLength) { m.send(player, "pass_len"); return true; } if (!Settings.unsafePasswords.isEmpty()) { if (Settings.unsafePasswords.contains(lowpass)) { - m.send(player, "password_error"); + m.send(player, "password_error_unsafe"); return true; } }