Added check to avoid review file append if only one user.

This commit is contained in:
Christian P. MOMON 2018-05-19 00:27:53 +02:00
parent 7e905380f8
commit 64dbe8bcf3

View File

@ -407,8 +407,11 @@ public class Hebdobot extends PircBot
sendMessage("% " + ReviewStatsReporter.reportUserCount(datas, currentReview.getUserCount())); sendMessage("% " + ReviewStatsReporter.reportUserCount(datas, currentReview.getUserCount()));
sendMessage("% " + ReviewStatsReporter.reportDuration(datas, currentReview.getUserCount())); sendMessage("% " + ReviewStatsReporter.reportDuration(datas, currentReview.getUserCount()));
if (this.review.getParticipants().size() > 1)
{
ReviewDatasFile.append(reviewDataFile, currentReview); ReviewDatasFile.append(reviewDataFile, currentReview);
} }
}
else else
{ {
logger.warn("Statistic file not found [{}]", reviewDataFile.getAbsolutePath()); logger.warn("Statistic file not found [{}]", reviewDataFile.getAbsolutePath());