diff --git a/src/org/april/hebdobot/bot/hooks/StartReviewHook.java b/src/org/april/hebdobot/bot/hooks/StartReviewHook.java index a88e01f..93d26c5 100644 --- a/src/org/april/hebdobot/bot/hooks/StartReviewHook.java +++ b/src/org/april/hebdobot/bot/hooks/StartReviewHook.java @@ -54,24 +54,31 @@ public class StartReviewHook extends Hook else { // Start. - if (bot.getCronManager() != null) + if (bot.getReview() != null) { - try - { - bot.getCronManager().shutdown(); - } - catch (SchedulerException exception) - { - logger.warn("Scheduler shutdown failed.", exception); - } + bot.sendMessage("% " + sender + ", une revue est déjà en cours."); + } + else + { + if (bot.getCronManager() != null) + { + try + { + bot.getCronManager().shutdown(); + } + catch (SchedulerException exception) + { + logger.warn("Scheduler shutdown failed.", exception); + } + } + bot.setReview(new Review(sender, bot.getAliases())); + bot.sendMessage(sender, "Bonjour " + sender + ", vous êtes le conducteur de réunion."); + bot.sendMessage(sender, "Pour terminer la réunion, tapez \"!fin\""); + bot.sendMessage("% Début de la réunion hebdomadaire"); + bot.sendMessage( + "% rappel : toute ligne commençant par % sera considérée comme un commentaire et non prise en compte dans la synthèse"); + bot.sendMessage("% pour connaître le point courant, taper !courant"); } - bot.setReview(new Review(sender, bot.getAliases())); - bot.sendMessage(sender, "Bonjour " + sender + ", vous êtes le conducteur de réunion."); - bot.sendMessage(sender, "Pour terminer la réunion, tapez \"!fin\""); - bot.sendMessage("% Début de la réunion hebdomadaire"); - bot.sendMessage( - "% rappel : toute ligne commençant par % sera considérée comme un commentaire et non prise en compte dans la synthèse"); - bot.sendMessage("% pour connaître le point courant, taper !courant"); } result = true;