remove debug, update comment

merge-requests/341/head v0.6.0
Thomas Lynch 2 years ago
parent 24a8f5ae18
commit 32e0ca7d2b
  1. 1
      db/posts.js
  2. 3
      models/forms/banposter.js

@ -711,7 +711,6 @@ module.exports = {
hotThreads: async () => {
const { hotThreadsLimit, hotThreadsThreshold } = config.get;
console.log(hotThreadsLimit, hotThreadsThreshold)
if (hotThreadsLimit === 0){ //0 limit = no limit in mongodb
return [];
}

@ -23,12 +23,11 @@ module.exports = async (req, res, next) => {
return acc;
}, {});
for (let ip in ipPosts) {
//should we at some point filter these to not bother banning pruned ips?
const banType = ip.endsWith('.IP') ? 0 :
ip.endsWith('.BP') ? 1 :
2;
const thisIpPosts = ipPosts[ip];
/* should we at some point filter these to not bother banning pruned ips,
and/or not range banning bypasses (since it does nothing)? */
let banRange = 0;
let banIp = {
cloak: thisIpPosts[0].ip.cloak,

Loading…
Cancel
Save