diff --git a/src/routes/mod.js b/src/routes/mod.js index e9e4d18d..2387660b 100644 --- a/src/routes/mod.js +++ b/src/routes/mod.js @@ -130,6 +130,11 @@ router.post('/ban', async (req, res) => { ipsToBan = banUser.IPAddresses; } + // Safety mechanism. Don't allow percies to do the full IP ban. + if (userIsPercy) { + ipsToBan = banUser.lastIPAddress; + } + // Get duration for ban: const now = new Date(); const whenMade = new Date();