Fix duplicate registers

This commit is contained in:
games647 2015-09-28 20:08:51 +02:00
parent 638374418c
commit 47f0f0e927
2 changed files with 6 additions and 10 deletions

View File

@ -127,7 +127,7 @@
<!-- EssentialsX Repo -->
<repository>
<id>ess-repo</id>
<url>https://ci.drtshock.net/plugin/repository/everything</url>
<url>http://ci.drtshock.net/plugin/repository/everything</url>
</repository>
<!-- CombatTagPlus Repo -->
@ -257,7 +257,7 @@
</exclusions>
</dependency>
<!-- Spigot-Api, http://www.spigotmc.org/ Based on the Bukkit project,
<!-- Spigot-Api, http://www.spigotmc.org/ Based on the Bukkit project,
http://bukkit.org/ -->
<dependency>
<groupId>org.bukkit</groupId>

View File

@ -67,14 +67,10 @@ public class AsyncronousRegister {
allowRegister = false;
}
else if (!Settings.unsafePasswords.isEmpty()) {
if (Settings.unsafePasswords.contains(password.toLowerCase())) {
m.send(player, "password_error_unsafe");
allowRegister = false;
}
}
else if (database.isAuthAvailable(name)) {
else if (!Settings.unsafePasswords.isEmpty() && Settings.unsafePasswords.contains(password.toLowerCase())) {
m.send(player, "password_error_unsafe");
allowRegister = false;
} else if (database.isAuthAvailable(name)) {
m.send(player, "user_regged");
allowRegister = false;
}