ptt/pttbbs

Combine "last recommend" and "cooldown" timers

wens opened this issue · 0 comments

wens commented

Currently there are two systems in place to prevent abuse:

  1. Opt-in per-board limitations on push/recommend intervals
  2. System-wide "cooldown" mechanic for board opt-in and mandatory limitations on accounts with rejected articles.

The timer for the first system is non-persistent, meaning it is reset when the user logs off.
The timer for the second system is persistent in shared memory, but the rules for it are slightly opaque, and it only has 15 second resolution.

It may be a good trade-off to use the persistent timer of the second system for the first one as well. If the resolution is unacceptable, then move out the rejected-article counter to restore it to per-second resolution.