From e38db62717203ee7f7074b4c69aaa587a0e8ebac Mon Sep 17 00:00:00 2001 From: Alexandre Anriot Date: Thu, 15 Sep 2005 11:46:08 +0000 Subject: [PATCH] statut! --- admin/lib/Evoauth/Iptables.pm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/admin/lib/Evoauth/Iptables.pm b/admin/lib/Evoauth/Iptables.pm index 83b8663..d590e3d 100644 --- a/admin/lib/Evoauth/Iptables.pm +++ b/admin/lib/Evoauth/Iptables.pm @@ -92,9 +92,15 @@ sub check_iptables() { $sth->fetch(); # si entrée iptables présente mais statut non connecté, on supprime - defined($statut) ? $statut : 0; + if (defined($statut)) { + if ($statut != 1) { + &Evoauth::Functions::Log("$ip [supprimée]\n") && + &Evoauth::Functions::Mail("Suppression", $ip); + &Alter(3, $ip); + } + } - if ($statut != 1) { + else { &Evoauth::Functions::Log("$ip [supprimée]\n") && &Evoauth::Functions::Mail("Suppression", $ip); &Alter(3, $ip); @@ -123,7 +129,6 @@ sub check_timestamp() { &Evoauth::Functions::Log("Vérification de la base."); my ($newtime, $oldtime, $cpt); - defined($statut) ? $statut : 0; while ($sth->fetch() && $sth != 0) { if ($statut == 1) {