Only notify staff if 3 or more players report a player.

This commit is contained in:
Keir 2015-10-27 22:14:33 +00:00
parent 53f2356cba
commit d9fb0adabb

View File

@ -140,11 +140,16 @@ public class ReportManager {
reportRepository.addElement(report);
}
// [Report 42] [MrTwiggy +7] [Cheater102 - 5 - Speed hacking]
String message = String.format("[Report %d] [%s %d] [%s - %d - %s]", report.getReportId(),
reporter.getName(), reportProfile.getReputation(),
reportedPlayer.getName(), report.getReporters().size(), reason);
sendReportNotification(message);
// only start notifying staff when
if (report.getReporters().size() >= 3)
{
// [Report 42] [MrTwiggy +7] [Cheater102 - 5 - Speed hacking]
String message = String.format("[Report %d] [%s %d] [%s - %d - %s]", report.getReportId(),
reporter.getName(), reportProfile.getReputation(),
reportedPlayer.getName(), report.getReporters().size(), reason);
sendReportNotification(message);
}
reportSqlRepository.logReportSending(report.getReportId(), reporterId, reason);
}
}