kick fix for day listener

This commit is contained in:
Sebastien 2019-07-14 20:55:51 +02:00
parent 7c9015cfde
commit 7dafb71de2
2 changed files with 11 additions and 3 deletions

View File

@ -24,6 +24,8 @@ import java.util.Objects;
/** /**
* Spam admin command * Spam admin command
*/ */
// TODO Rebuild this ...
public class Spam implements Commande { public class Spam implements Commande {
private Logger logger = LogManager.getLogger(); private Logger logger = LogManager.getLogger();
@ -307,9 +309,10 @@ public class Spam implements Commande {
if (args[0].equals("all")) if (args[0].equals("all"))
{ {
logger.info("Multiplicator reseted automaticly."); logger.info("Multiplicator reseted automaticly.");
for (Member unUser: MainBot.spamUtils.keySet() ) //=for(int i=0; i<saveRoleUser.size(); i++) for (Member unUser: MainBot.spamUtils.keySet())
{ {
MainBot.message_compteur.remove(unUser);
MainBot.message_compteur.remove(unUser); //TODO resolve garbage collector error ????
} }
} }
} }

View File

@ -54,7 +54,12 @@ public class DayListener extends Thread {
*/ */
public void trigger(){ public void trigger(){
for(NewDayListener listener : listeners){ for(NewDayListener listener : listeners){
try{
listener.onNewDay(); listener.onNewDay();
}catch (Exception ex){
logger.error("Fail to execute day change !");
logger.catching(ex);
}
} }
} }