explosive timeouts can no longer stack

This commit is contained in:
2025-09-14 01:30:31 +02:00
parent af371e0305
commit 6040a47cf6

View File

@@ -37,6 +37,7 @@ export const timeout = async (user: User, reason: string, duration?: number): Pr
return { status: false, reason: 'unknown' };
};
await user.clearVulnerable();
await redis.set(`user:${user.id}:timeout`, '1');
if (duration) await redis.expire(`user:${user.id}:timeout`, duration);