This commit is contained in:
Lixfel
2025-01-20 12:25:55 +01:00
parent 21b389a993
commit 721723716e
2 changed files with 2 additions and 9 deletions
@@ -29,7 +29,6 @@ import java.security.SecureRandom;
import java.security.spec.InvalidKeySpecException; import java.security.spec.InvalidKeySpecException;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.util.*; import java.util.*;
import java.util.function.BiConsumer;
import java.util.function.Consumer; import java.util.function.Consumer;
import java.util.logging.Level; import java.util.logging.Level;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@@ -359,7 +358,7 @@ public class SteamwarUser {
} }
public boolean hasPassword() { public boolean hasPassword() {
return this.password == null; return this.password != null;
} }
private byte[] generateHash(String password, byte[] salt) private byte[] generateHash(String password, byte[] salt)
@@ -23,8 +23,6 @@ import de.steamwar.command.SWCommand;
import de.steamwar.messages.Chatter; import de.steamwar.messages.Chatter;
import de.steamwar.sql.SteamwarUser; import de.steamwar.sql.SteamwarUser;
import java.io.IOException;
public class WebpasswordCommand extends SWCommand { public class WebpasswordCommand extends SWCommand {
public WebpasswordCommand() { public WebpasswordCommand() {
@@ -44,10 +42,6 @@ public class WebpasswordCommand extends SWCommand {
user.setPassword(password); user.setPassword(password);
if (resetPW) { sender.system(resetPW ? "WEB_UPDATED" : "WEB_CREATED");
sender.system("WEB_UPDATED");
} else {
sender.system("WEB_CREATED");
}
} }
} }