Fixed a code discrepancy.

This commit is contained in:
Paldiu 2023-03-31 21:41:28 -05:00 committed by GitHub
parent 8b48408870
commit a3530ad143
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -35,7 +35,7 @@ public class BanManager extends FreedomService
FLog.severe("Failed to load ban list: " + throwable.getMessage()); FLog.severe("Failed to load ban list: " + throwable.getMessage());
return; return;
} }
result.getAllRowsResultSet().forEach(row -> result.getAllRowsResultSet().forEach(row ->
{ {
ResultSetProvider banSet = ResultSetProvider.fromRow(row); ResultSetProvider banSet = ResultSetProvider.fromRow(row);
@ -53,13 +53,12 @@ public class BanManager extends FreedomService
String reason = banSet.getString("reason"); String reason = banSet.getString("reason");
Ban ban = new Ban(name, uuid, ips, by, at, expires, reason); Ban ban = new Ban(name, uuid, ips, by, at, expires, reason);
bans.add(ban); bans.add(ban);
// Remove expired bans, repopulate ipBans and nameBans,
updateViews();
FLog.info("Loaded " + ipBans.size() + " IP bans and " + nameBans.size() + " username bans.");
}); });
}); });
// Remove expired bans, repopulate ipBans and nameBans,
updateViews();
FLog.info("Loaded " + ipBans.size() + " IP bans and " + nameBans.size() + " username bans.");
} }
@Override @Override
@ -334,4 +333,4 @@ public class BanManager extends FreedomService
} }
} }
} }
} }