Archiviert
1
0

Fixing Ban extended

Dieser Commit ist enthalten in:
Chaoscaot 2020-11-15 20:45:34 +01:00
Ursprung aa73889ffe
Commit cfb12dfb75

Datei anzeigen

@ -117,22 +117,22 @@ public class Punishment {
return perma; return perma;
} }
public void updateEndTime(int from, String reason, Timestamp newUpdate, boolean perma) { public void updateEndTime(int from, String newreason, Timestamp newUpdate, boolean perma) {
StringBuilder newReason = new StringBuilder(reason); StringBuilder newReason = new StringBuilder(this.reason);
if(newUpdate.before(endTime)) if(newUpdate.before(endTime) || this.perma)
newReason.append(" verkürtz vom ") newReason.append("verkürtz vo" + (this.perma?"n":"m") + " ")
.append(getBantime()) .append(getBantime())
.append(" von ") .append(" von ")
.append(SteamwarUser.get(from).getUserName()) .append(SteamwarUser.get(from).getUserName())
.append(" Grund: ") .append(" Grund: ")
.append(reason); .append(newreason);
else else
newReason.append(" verlängert vom ") newReason.append("verlängert vo" + (this.perma?"n":"m") + " ")
.append(getBantime()) .append(getBantime())
.append(" von ") .append(" von ")
.append(SteamwarUser.get(from).getUserName()) .append(SteamwarUser.get(from).getUserName())
.append(" Grund: ") .append(" Grund: ")
.append(reason); .append(newreason);
SQL.update("UPDATE Punishments SET EndTime = ?, Reason = ?, Perma = ? WHERE PunishmentId = ?", newUpdate, newReason.toString(), perma, id); SQL.update("UPDATE Punishments SET EndTime = ?, Reason = ?, Perma = ? WHERE PunishmentId = ?", newUpdate, newReason.toString(), perma, id);
this.reason = newReason.toString(); this.reason = newReason.toString();