add a 'shape' field and antispam update

Signed-off-by: leto <leto@weboob.org>
Signed-off-by: Romain Bignon <romain@peerfuse.org>
This commit is contained in:
leto 2011-11-19 21:58:52 +01:00 committed by Romain Bignon
commit 342cb75cba
2 changed files with 8 additions and 1 deletions

View file

@ -58,9 +58,13 @@ class AntiSpam(object):
return False
if ipaddr.startswith('194.177.'):
return False
if ipaddr.startswith('41.85.'):
return False
if ipaddr.startswith('41.86.'):
return False
if re.match('105\.13\d.*', ipaddr):
return False
if ipaddr in ('62.157.186.18', '198.36.222.8', '212.234.67.61'):
if ipaddr in ('62.157.186.18', '198.36.222.8', '212.234.67.61', '203.193.158.210', '41.189.34.180', '41.66.12.36', '196.47.137.21', '213.136.125.122'):
return False
return True
@ -101,6 +105,8 @@ class AntiSpam(object):
return False
if ipaddr.endswith('.cba.embratel.net.br'):
return False
if ipaddr.endswith('.idstelcom.com'):
return False
return True
def check_mail(self, mail):

View file

@ -156,6 +156,7 @@ class Contact(_Contact):
('weight', FieldList('weight')),
('BMI', FieldBMI('size', 'weight')),
('fat', FieldBMI('size', 'weight', fat=True)),
('shape', FieldList('shape')),
('origins', FieldList('origins')),
('signs', FieldFlags('checks1')),
('job', FieldStr('job')),