flood prevention

This commit is contained in:
Savetheinternet 2011-01-18 17:11:28 +11:00
parent 5c2b7dfe61
commit d284b0d50d
3 changed files with 28 additions and 2 deletions

View file

@ -143,6 +143,10 @@
markup($post['body']);
// Check for a flood
if(checkFlood($post))
error(ERROR_FLOOD);
if($post['has_file']) {
// Just trim the filename if it's too long
if(strlen($post['filename']) > 30) $post['filename'] = substr($post['filename'], 0, 27).'…';