1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-23 23:20:57 +01:00

Flood filters

This commit is contained in:
Savetheinternet 2011-03-27 23:06:57 +11:00
parent 49e9103daf
commit 187b476aae
2 changed files with 16 additions and 0 deletions

View File

@ -379,6 +379,7 @@
);
// Custom flood filters. Detect flood attacks and reject new posts if there's a positive match.
// See http://tinyboard.org/wiki/index.php?title=Flood_filters for more information.
//$config['flood_filters'][] = Array(
// 'condition' => Array(
// // 100 posts in the past 5 minutes (~20 p/m)

View File

@ -332,6 +332,21 @@
// Matched filter
continue;
}
} elseif($condition == 'name') {
if(preg_match($value, $post['name']))
continue;
} elseif($condition == 'trip') {
if(preg_match($value, $post['trip']))
continue;
} elseif($condition == 'email') {
if(preg_match($value, $post['email']))
continue;
} elseif($condition == 'subject') {
if(preg_match($value, $post['subject']))
continue;
} elseif($condition == 'body') {
if(preg_match($value, $post['body_nomarkup']))
continue;
} elseif($condition == 'OP') {
// Am I OP?
if($value == $OP)