Merge pull request 'Fix Double Bans' (#434) from fix_double_bans into master
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Reviewed-on: #434 Reviewed-by: Lixfel <lixfel@steamwar.de>
Dieser Commit ist enthalten in:
Commit
093b861342
@ -325,14 +325,14 @@ public class SteamwarUser {
|
|||||||
|
|
||||||
ProxiedPlayer player = ProxyServer.getInstance().getPlayer(uuid);
|
ProxiedPlayer player = ProxyServer.getInstance().getPlayer(uuid);
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
updateBanIP(player.getAddress().getAddress().getHostAddress());
|
|
||||||
ChatSender.disconnect(player).system(punishmentMessage(punishment));
|
ChatSender.disconnect(player).system(punishmentMessage(punishment));
|
||||||
for (BannedUserIPs banned : BannedUserIPs.get(player.getAddress().getAddress().getHostAddress())) {
|
for (BannedUserIPs banned : BannedUserIPs.get(player.getAddress().getAddress().getHostAddress())) {
|
||||||
SteamwarUser bannedUser = SteamwarUser.get(banned.getUserID());
|
SteamwarUser bannedUser = SteamwarUser.get(banned.getUserID());
|
||||||
if (isPunished(punishment) && bannedUser.getPunishment(punishment).getEndTime().before(time)) {
|
if (bannedUser.isPunished(punishment) && bannedUser.getPunishment(punishment).getEndTime().before(time)) {
|
||||||
bannedUser.punish(punishment, time, banReason, from, perma);
|
bannedUser.punish(punishment, time, banReason, from, perma);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
updateBanIP(player.getAddress().getAddress().getHostAddress());
|
||||||
} else {
|
} else {
|
||||||
updateBanIP("");
|
updateBanIP("");
|
||||||
}
|
}
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren