Players should still be report banned if they reach abuse threshold

even if reportCloser is not present

Also alert players of report closing regardless of whether
reportCloser is present
This commit is contained in:
Keir Nellyer 2016-09-28 10:40:39 +01:00
parent 84e1a7291b
commit 6f77c05f1e

View File

@ -265,8 +265,6 @@ public class ReportManager
CompletableFuture<Long> saveCompletableFuture = saveReport(report); CompletableFuture<Long> saveCompletableFuture = saveReport(report);
saveCompletableFuture.thenAccept(reportId -> saveCompletableFuture.thenAccept(reportId ->
{
if (reportCloser != null)
{ {
if (reportResult.getType() == ReportResultType.ABUSIVE) if (reportResult.getType() == ReportResultType.ABUSIVE)
{ {
@ -286,6 +284,9 @@ public class ReportManager
String prefix = getReportPrefix(reportId); String prefix = getReportPrefix(reportId);
String reason = reasonOptional.isPresent() ? reasonOptional.get() : "No reason specified."; String reason = reasonOptional.isPresent() ? reasonOptional.get() : "No reason specified.";
if (reportCloser != null)
{
if (reportResult.getType() == ReportResultType.ACCEPTED) if (reportResult.getType() == ReportResultType.ACCEPTED)
{ {
// todo new punish gui // todo new punish gui
@ -299,6 +300,7 @@ public class ReportManager
F.main(prefix, "Report marked as: " F.main(prefix, "Report marked as: "
+ C.cGold + reportResult.getType().getName())); + C.cGold + reportResult.getType().getName()));
reportCloser.sendMessage(F.main(prefix, "Reason: " + F.elem(reason))); reportCloser.sendMessage(F.main(prefix, "Reason: " + F.elem(reason)));
}
getUUIDs(report.getReporterIds()).thenAccept(ids -> getUUIDs(report.getReporterIds()).thenAccept(ids ->
{ {
@ -319,7 +321,6 @@ public class ReportManager
new ReportersNotification(ids, jsonMessage).publish(); new ReportersNotification(ids, jsonMessage).publish();
}); });
}); });
}
_reportRepository.clearCache(reportId); _reportRepository.clearCache(reportId);
}).exceptionally(throwable -> { }).exceptionally(throwable -> {