summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--inc/config.php1
-rw-r--r--post.php15
2 files changed, 16 insertions, 0 deletions
diff --git a/inc/config.php b/inc/config.php
index 63e42c39..4bd09080 100644
--- a/inc/config.php
+++ b/inc/config.php
@@ -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)
diff --git a/post.php b/post.php
index 18c97435..590be24a 100644
--- a/post.php
+++ b/post.php
@@ -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)