summaryrefslogtreecommitdiff
path: root/inc/filters.php
diff options
context:
space:
mode:
authorMichael Foster <savetheinternet@tinyboard.org>2013-09-08 15:07:55 +1000
committerMichael Foster <savetheinternet@tinyboard.org>2013-09-08 15:07:55 +1000
commitd4cf4c7afb975cead41768c9e0d1960a46183409 (patch)
tree30c4d284f7ddf95b62130fe1843ac28945247309 /inc/filters.php
parenta13571cdade07802fcf8c72cb0924cf455032a12 (diff)
flood-count condition
Diffstat (limited to 'inc/filters.php')
-rw-r--r--inc/filters.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/inc/filters.php b/inc/filters.php
index d2802264..d5353afb 100644
--- a/inc/filters.php
+++ b/inc/filters.php
@@ -73,6 +73,14 @@ class Filter {
}
}
return false;
+ case 'flood-count':
+ $count = 0;
+ foreach ($this->flood_check as $flood_post) {
+ if (time() - $flood_post['time'] <= $this->condition['flood-time']) {
+ ++$count;
+ }
+ }
+ return $count >= $match;
case 'name':
return preg_match($match, $post['name']);
case 'trip':