make that actually work

merge-requests/208/head
fatchan 5 years ago
parent c9d1e7ca57
commit 4ac46b0003
  1. 6
      helpers/checks/spamcheck.js

@ -44,15 +44,15 @@ module.exports = async (req, res) => {
'_id': {
'$gt': last120id
},
'ip': res.locals.ip.hash,
'ip.hash': res.locals.ip.hash,
'$or': contentOr
});
//any posts from same IP in past 15 seconds
//any posts from same IP in past 5 seconds
ors.push({
'_id': {
'$gt': last5id
},
'ip': res.locals.ip.hash
'ip.hash': res.locals.ip.hash
})
let flood = await Posts.db.find({

Loading…
Cancel
Save