Merge remote-tracking branch 'origin/master' into multitool/main
Einige Prüfungen sind fehlgeschlagen
SteamWarCI Build failed
Einige Prüfungen sind fehlgeschlagen
SteamWarCI Build failed
# Conflicts: # src/de/steamwar/sql/EventFight.java # src/de/steamwar/sql/Referee.java
Dieser Commit ist enthalten in:
Commit
076fa8ad78
10
build.gradle
10
build.gradle
@ -74,15 +74,15 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly 'org.projectlombok:lombok:1.18.22'
|
||||
testCompileOnly 'org.projectlombok:lombok:1.18.22'
|
||||
annotationProcessor 'org.projectlombok:lombok:1.18.22'
|
||||
testAnnotationProcessor 'org.projectlombok:lombok:1.18.22'
|
||||
compileOnly 'org.projectlombok:lombok:1.18.32'
|
||||
testCompileOnly 'org.projectlombok:lombok:1.18.32'
|
||||
annotationProcessor 'org.projectlombok:lombok:1.18.32'
|
||||
testAnnotationProcessor 'org.projectlombok:lombok:1.18.32'
|
||||
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
testImplementation 'org.hamcrest:hamcrest:2.2'
|
||||
|
||||
compileOnly 'org.xerial:sqlite-jdbc:3.36.0'
|
||||
compileOnly 'org.xerial:sqlite-jdbc:3.46.0.0'
|
||||
}
|
||||
|
||||
task buildResources {
|
||||
|
@ -116,6 +116,20 @@ public class EventFight {
|
||||
setFight.update(fight, fightID);
|
||||
}
|
||||
|
||||
public boolean hasFinished() {
|
||||
return fight != 0 || ergebnis != 0;
|
||||
}
|
||||
|
||||
public void reschedule() {
|
||||
startTime = Timestamp.from(new Date().toInstant().plus(30, SECONDS));
|
||||
reschedule.update(startTime, fightID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode(){
|
||||
return fightID;
|
||||
}
|
||||
|
||||
public void update() {
|
||||
update.update(startTime, spielModus, map, teamBlue, teamRed, spectatePort, fightID);
|
||||
}
|
||||
|
@ -44,6 +44,8 @@ public class Referee {
|
||||
delete.update(eventID, userID);
|
||||
}
|
||||
|
||||
private static final SelectStatement<Referee> byEvent = table.selectFields("eventID");
|
||||
|
||||
public static Set<Integer> get(int eventID) {
|
||||
return byEvent.listSelect(eventID).stream().map(referee -> referee.userID).collect(Collectors.toSet());
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ public class SWException {
|
||||
private static final String SERVER_NAME = new File(CWD).getName();
|
||||
|
||||
private static final Table<SWException> table = new Table<>(SWException.class, "Exception");
|
||||
private static final Statement insert = table.insertFields("server", "message", "stacktrace");
|
||||
private static final Statement insert = table.insertFields(true, "server", "message", "stacktrace");
|
||||
|
||||
@Field(keys = {Table.PRIMARY}, autoincrement = true)
|
||||
private final int id;
|
||||
@ -52,10 +52,17 @@ public class SWException {
|
||||
private final String stacktrace;
|
||||
|
||||
public static void log(String message, String stacktrace){
|
||||
insert.update(SERVER_NAME, generateMessage(message), stacktrace);
|
||||
}
|
||||
|
||||
public static int logGetId(String message, String stacktrace) {
|
||||
return insert.insertGetKey(SERVER_NAME, generateMessage(message), stacktrace);
|
||||
}
|
||||
|
||||
private static String generateMessage(String message) {
|
||||
StringBuilder msgBuilder = new StringBuilder(message);
|
||||
SQLWrapper.impl.additionalExceptionMetadata(msgBuilder);
|
||||
msgBuilder.append("\nCWD: ").append(CWD);
|
||||
|
||||
insert.update(SERVER_NAME, msgBuilder.toString(), stacktrace);
|
||||
return msgBuilder.toString();
|
||||
}
|
||||
}
|
||||
|
@ -39,6 +39,7 @@ public enum UserPerm {
|
||||
RESTRICTED_MODS,
|
||||
COLOR_CHAT,
|
||||
TEAM,
|
||||
TICKET_LOG,
|
||||
BUILD,
|
||||
CHECK,
|
||||
MODERATION,
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren