From d4cf4c7afb975cead41768c9e0d1960a46183409 Mon Sep 17 00:00:00 2001 From: Michael Foster Date: Sun, 8 Sep 2013 15:07:55 +1000 Subject: flood-count condition --- inc/filters.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'inc/filters.php') 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': -- cgit v1.3