[gen_confs/,surveillance/] virus splitte vers virus et autodisc_virus
Pour que le systeme n'enleve pas les deconnexions manuelles, et pour pouvoir mettre un message different aux gens deconnectes manuellement darcs-hash:20100316200552-ddb99-86effb62af5f560cd99563326d98d9721e51e289.gz
This commit is contained in:
parent
2d5c0b4757
commit
ed855e941f
5 changed files with 20 additions and 9 deletions
|
@ -294,14 +294,14 @@ for ip, nombre in infectes:
|
|||
curseur.execute(requete)
|
||||
|
||||
# On récupère les index des lignes de bl où il y a marqué virus
|
||||
index = [blacklist.index(x) for x in blacklist if 'virus' in x ]
|
||||
index = [blacklist.index(x) for x in blacklist if 'autodisc_virus' in x ]
|
||||
if index:
|
||||
# L'adhérent est déjà blacklisté
|
||||
proprio.blacklist((index[0], ['now', '-', 'virus', hostname]))
|
||||
proprio.blacklist((index[0], ['now', '-', 'autodisc_virus', hostname]))
|
||||
proprio.save()
|
||||
else:
|
||||
# L'adhérent n'est pas encore blacklisté
|
||||
proprio.blacklist(['now', '-', 'virus', hostname])
|
||||
proprio.blacklist(['now', '-', 'autodisc_virus', hostname])
|
||||
proprio.save()
|
||||
|
||||
################################################################################
|
||||
|
@ -340,14 +340,14 @@ for ip, nombre in infectes:
|
|||
curseur.execute(requete)
|
||||
|
||||
# On récupère les index des lignes de bl où il y a marqué virus
|
||||
index = [ blacklist.index(x) for x in blacklist if 'virus' in x ]
|
||||
index = [ blacklist.index(x) for x in blacklist if 'autodisc_virus' in x ]
|
||||
if index:
|
||||
# L'adhérent est déjà blacklisté
|
||||
proprio.blacklist((index[0], ['now', '-', 'virus', hostname]))
|
||||
proprio.blacklist((index[0], ['now', '-', 'autodisc_virus', hostname]))
|
||||
proprio.save()
|
||||
else:
|
||||
# L'adhérent n'est pas encore blacklisté
|
||||
proprio.blacklist(['now', '-', 'virus', hostname])
|
||||
proprio.blacklist(['now', '-', 'autodisc_virus', hostname])
|
||||
proprio.save()
|
||||
|
||||
|
||||
|
@ -390,7 +390,7 @@ for IP in infectes:
|
|||
# ont pu s'ajouter.
|
||||
lignes_enlevees = 0
|
||||
for ligne in bl:
|
||||
if '$-$virus$%s' % hostname in ligne:
|
||||
if '$-$autodisc_virus$%s' % hostname in ligne:
|
||||
liste = ligne.split('$')
|
||||
argument = [liste[0], 'now', liste[2], liste[3]]
|
||||
index = bl.index(ligne)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue