diff --git a/gestion/chambres_vides.py b/gestion/chambres_vides.py index 70305fe1..488f4bdf 100755 --- a/gestion/chambres_vides.py +++ b/gestion/chambres_vides.py @@ -63,7 +63,7 @@ for clandestin in bad_boys_e_s: delta = now - kickout_date ttl = delai*86400 - delta if ttl > 0: - if sendmails and machine_liste != [] or DEBUG: + if (sendmails and machine_liste != [] or DEBUG) and (ttl >= (delai - 1)*86400 or 0 < ttl <= 86400): # On lui envoie un mail pour le prévenir to = clandestin.mail() if not "@" in to: