flood-count condition

This commit is contained in:
Michael Foster
2013-09-08 15:07:55 +10:00
parent a13571cdad
commit d4cf4c7afb
2 changed files with 24 additions and 3 deletions

View File

@@ -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':