Ursprung
07c7635ab4
Commit
fd1d556fa3
@ -50,7 +50,7 @@ public class AuthManager {
|
|||||||
String code = Base64.getEncoder().encodeToString(randBytes);
|
String code = Base64.getEncoder().encodeToString(randBytes);
|
||||||
|
|
||||||
TOKENS.put(code, user);
|
TOKENS.put(code, user);
|
||||||
VelocityCore.getLogger().log(Level.INFO, "Created Discord Auth-Token: {0} for: {1}", new Object[] {code, user.getAsTag()});
|
VelocityCore.getLogger().log(Level.INFO, "Created Discord Auth-Token: {0} for: {1}".formatted(code, user.getAsTag()));
|
||||||
VelocityCore.schedule(() -> TOKENS.remove(code)).delay(10, TimeUnit.MINUTES).schedule();
|
VelocityCore.schedule(() -> TOKENS.remove(code)).delay(10, TimeUnit.MINUTES).schedule();
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
|
@ -58,7 +58,7 @@ public class ChatListener extends BasicListener {
|
|||||||
if (message.contains("jndi:ldap")) {
|
if (message.contains("jndi:ldap")) {
|
||||||
SteamwarUser user = SteamwarUser.get(player.getUniqueId());
|
SteamwarUser user = SteamwarUser.get(player.getUniqueId());
|
||||||
PunishmentCommand.ban(user, Punishment.PERMA_TIME, "Versuchte Exploit-Ausnutzung", SteamwarUser.get(-1), true);
|
PunishmentCommand.ban(user, Punishment.PERMA_TIME, "Versuchte Exploit-Ausnutzung", SteamwarUser.get(-1), true);
|
||||||
VelocityCore.getLogger().log(Level.SEVERE, "{0} {1} wurde automatisch wegen jndi:ldap gebannt.", new Object[]{user.getUserName(), user.getId()});
|
VelocityCore.getLogger().log(Level.SEVERE, "{0} {1} wurde automatisch wegen jndi:ldap gebannt.".formatted(user.getUserName(), user.getId()));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ public class ModUtils {
|
|||||||
Chatter sender = Chatter.of(uuid);
|
Chatter sender = Chatter.of(uuid);
|
||||||
SteamwarUser user = sender.user();
|
SteamwarUser user = sender.user();
|
||||||
playerModMap.put(uuid,new ArrayList<>(mods));
|
playerModMap.put(uuid,new ArrayList<>(mods));
|
||||||
VelocityCore.getLogger().log(Level.INFO, "{0} declares mods: {1}", new Object[]{user.getUserName(), mods.stream().map(mod -> mod.getPlatform() + ":" + mod.getModName()).collect(Collectors.joining(" "))});
|
VelocityCore.getLogger().log(Level.INFO, "{0} declares mods: {1}".formatted(user.getUserName(), mods.stream().map(mod -> mod.getPlatform() + ":" + mod.getModName()).collect(Collectors.joining(" "))));
|
||||||
|
|
||||||
ModType max = ModType.YELLOW;
|
ModType max = ModType.YELLOW;
|
||||||
Iterator<Mod> it = mods.iterator();
|
Iterator<Mod> it = mods.iterator();
|
||||||
@ -83,7 +83,7 @@ public class ModUtils {
|
|||||||
|
|
||||||
if(max == ModType.RED) {
|
if(max == ModType.RED) {
|
||||||
PunishmentCommand.ban(user, Timestamp.from(Instant.now().plus(7, ChronoUnit.DAYS)), message, SteamwarUser.get(-1), false);
|
PunishmentCommand.ban(user, Timestamp.from(Instant.now().plus(7, ChronoUnit.DAYS)), message, SteamwarUser.get(-1), false);
|
||||||
VelocityCore.getLogger().log(Level.SEVERE, "{0} {1} wurde automatisch wegen der Mods {2} gebannt.", new Object[]{user.getUserName(), user.getId(), modList});
|
VelocityCore.getLogger().log(Level.SEVERE, "{0} {1} wurde automatisch wegen der Mods {2} gebannt.".formatted(user.getUserName(), user.getId(), modList));
|
||||||
}
|
}
|
||||||
|
|
||||||
disconnect.accept(LegacyComponentSerializer.legacySection().deserialize(message));
|
disconnect.accept(LegacyComponentSerializer.legacySection().deserialize(message));
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren