Update Schematic Download and /webpw to new Website
This commit is contained in:
@@ -35,7 +35,7 @@ import java.time.Instant;
|
||||
public class NodeDownload {
|
||||
|
||||
private static final char[] HEX = new char[]{'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
|
||||
private static final String LINK_BASE = "https://steamwar.de/download.php?schem=";
|
||||
private static final String LINK_BASE = "https://steamwar.de/schematic?code=";
|
||||
|
||||
private static final Table<NodeDownload> table = new Table<>(NodeDownload.class);
|
||||
private static final Statement insert = table.insertFields("NodeId", "Link");
|
||||
|
||||
@@ -122,13 +122,12 @@ public class SteamwarUser {
|
||||
return byDiscord.select(discordId);
|
||||
}
|
||||
|
||||
public static SteamwarUser getOrCreate(UUID uuid, String name, Consumer<UUID> newPlayer, BiConsumer<String, String> nameUpdate) {
|
||||
public static SteamwarUser getOrCreate(UUID uuid, String name, Consumer<UUID> newPlayer) {
|
||||
SteamwarUser user = get(uuid);
|
||||
|
||||
if (user != null) {
|
||||
if (!user.userName.equals(name)) {
|
||||
updateName.update(name, user.id);
|
||||
nameUpdate.accept(user.userName, name);
|
||||
user.userName = name;
|
||||
}
|
||||
|
||||
@@ -359,6 +358,10 @@ public class SteamwarUser {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean hasPassword() {
|
||||
return this.password == null;
|
||||
}
|
||||
|
||||
private byte[] generateHash(String password, byte[] salt)
|
||||
throws InvalidKeySpecException {
|
||||
PBEKeySpec spec = new PBEKeySpec(password.toCharArray(), salt, 65536, 512);
|
||||
|
||||
Reference in New Issue
Block a user