# HG changeset patch # User neko259 # Date 2016-07-16 20:52:37 # Node ID 40b962862db394c22854b16d08842c63a9ac2417 # Parent 64c3bf38dd580464b288db13818e4591fea4d234 Add setting for form autoban diff --git a/boards/config/default_settings.ini b/boards/config/default_settings.ini --- a/boards/config/default_settings.ini +++ b/boards/config/default_settings.ini @@ -15,6 +15,7 @@ LimitPostingSpeed = false PowDifficulty = 0 # Delay in seconds PostingDelay = 30 +Autoban = false [Messages] # Thread bumplimit diff --git a/boards/forms.py b/boards/forms.py --- a/boards/forms.py +++ b/boards/forms.py @@ -273,7 +273,8 @@ class PostForm(NeboardForm): cleaned_data = super(PostForm, self).clean() if cleaned_data['email']: - self.need_to_ban = True + if board_settings.get_bool('Forms', 'Autoban'): + self.need_to_ban = True raise forms.ValidationError('A human cannot enter a hidden field') if not self.errors: